Forum Moderators: phranque
Recently i did a search site:www.mydomain.com and noticed that Google contains a whole bunch of urls with the domain that i'm redirecting with 301 to the main url.
When i created my .htaccess file for redirected domain i tested it in WebmasterWorld server header checker and all was Ok, i saw that 301 redirect.
Now WebmasterWorld server header checker tells that it see 200 Ok.
But i didn't changed anything!
My .htaccess :
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.maindomain\.com [NC]
RewriteRule ^(.*) [maindomain.com...] [R=301,L]
It was working some time ago and doesn't work now.
What could be the reason?
Thanks in advance.
(Note that posting on this board removes a required space between "}" and "!" in the RewriteCond. This will cause a 500-Server Error if not corrected before use.)
[added]
I would suggest adding another RewriteCond ahead of your first one:
RewriteCond %{HTTP_HOST} .
Jim