Forum Moderators: phranque
on a virtual server, I have the following domains:
d1.com, www.d1.com, d2.com, [...] that redirect to my root directory.
when a user types: d1.com/something they shoud be taken to: d1/index.php
when a user types: d2.com/someurl/asdf/ they shoud be taken to: d2/index.php
Formerly, I just had one domain where I used:
RewriteEngine On
RewriteRule .* d1/index.php [L]
Now, I need to modify this, so that I can use more than one domain.
Unfortunately, I couldn't find anything in Google. Thanks for your help!
--
globay
I think they came up with a solution similar to what you are looking for, here:
[webmasterworld.com...]
Jordan
The linked thread above is for a different problem.
> when a user types: d1.com/something they shoud be taken to: d1/index.php
> when a user types: d2.com/someurl/asdf/ they shoud be taken to: d2/index.php
> Now, I need to modify this, so that I can use more than one domain.
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)\.com [NC]
RewriteRule .* /%2/index.php [L]
Jim