|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I am stuck trying to make mod_rewrite work as I would like it to. I quickly explain my case: I have a virtualhost with the following directories in it's DocumentRoot: - 2005 - 2006 - 2007 For each of these directories I have a different hostname which should be associated to it, these are: - year05.domain.tld - year06.domain.tld - year07.domain.tld Now what I would like to do is mod_rewrite to rewrite the URL of year05.domain.tld so that it goes to http://year05.domain.tld/2005 and year06.domain.tld to go to http://year06.domain.tld/ and so on... How can I acheive that in one single virtual host entry ? Many thanks in advance for the Regards |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 8/21/2006 2:48 PM, syn_NOSPAM_uw wrote:
> I have a virtualhost with the following directories in it's DocumentRoot: > > - 2005 > - 2006 > - 2007 > > For each of these directories I have a different hostname which should > be associated to it, these are: > > - year05.domain.tld > - year06.domain.tld > - year07.domain.tld > > Now what I would like to do is mod_rewrite to rewrite the URL of > year05.domain.tld so that it goes to http://year05.domain.tld/2005 and > year06.domain.tld to go to http://year06.domain.tld/ and so on... > > How can I acheive that in one single virtual host entry ? RewriteCond %{HTTP_HOST} ^year05\.domain\.tld$ [NC] RewriteCond %{REQUEST_URI} !^/2005/ RewriteRule ^/(.*)$ /2005/$1 [L] etc. -- _________________________________________ Bob Smith -- bsmith@sudleydeplacespam.com To reply to me directly, delete "despam". |
|
![]() |
| Outils de la discussion | |
|
|