Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: httpd.conf IfModule mod_rewrite.c |
|
Author |
|
wolli
Joined: 20 Dec 2006 Posts: 1
|
Posted: Wed 20 Dec '06 21:04 Post subject: httpd.conf IfModule mod_rewrite.c |
|
|
hi,
<IfModule mod_rewrite.c>
RewriteEngine on
rewritecond %{HTTP_HOST} ^(www\.)?(.*)$
rewriterule (.*) /home/vhosts/%2$1
</IfModule>
with this rule i get:
domain.tld > /home/vhosts/domain.tld/
www.domain.tld > home/vhosts/domain.tld/
domain.tld/dir/file.xyz > home/vhosts/domain.tld/dir/file.xyz
sub.domain.tld > home/vhosts/sub.domain.tld/
sub1.sub.domain.tld > home/vhosts/sub1.sub.domain.tld/
the problem is the subdomains
the subdomains goes to:
sub.domain.tld > home/vhosts/sub.domain.tld/
sub1.sub.domain.tld > home/vhosts/sub1.sub.domain.tld/
but the subdomains must go to:
sub.domain.tld > home/vhosts/domain.tld/sub/
sub1.sub.domain.tld > home/vhosts/domain.tld/sub/sub1
But i dont now how i can change this in the cond ore rule
thanks for your help
wolli |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|