Hi all,
I'm trying to set up a redirection such that a request for
xyz.example.com/some/path
is transparently (i.e. the user still sees the original URL) routed to
www.example.com/xyz/some/path
The complication being that this is a Drupal site with Clean URLs, so there are already some rewrite rules in place:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
(The purpose of these, for those not familiar with Drupal, being to convert www.example.com/nice/url internally to www.example.com/index.php?q=nice/url)
I tried adding the following in between the first and second lines above, but it appears to do nothing at all - xyz.example.com/some/path delivers exactly the same page as www.example.com/some/path:
RewriteCond %{HTTP_HOST} ^xyz\.example\.com
RewriteRule ^(.*)$ xyz/$1 [QSA]
Can anyone explain why this doesn't work, and perhaps point me towards a better solution?
Thanks in advance!
-Ben