tags:

views:

17

answers:

0

I have the following rule on my local dev site and it works fine:

RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule ^subdomains/example\.com(.*) http://www.example.com$1 [R=301,L]

However when I change it to:

RewriteCond %{HTTP_HOST} ^www.some-domain.example$
RewriteRule ^subdomains/example\.com(.*) http://www.example.com$1 [R=301,L]

and upload it to my live site it doesn't work, if i change the rule to:

RewriteCond %{HTTP_HOST} ^www.some-domain.example$
RewriteRule ^subdomains/(.*) http://www.example.com$1 [R=301,L]

the rule functions as expected and directs an URL beginning with www.some-domain.example/subdomains/ to www.example.com/.

Does anyone know what is going on here?

Thanks for you help.