On 20 Jan 2012, at 4:19 PM, Thomas Svenson wrote:
Hi,
Discovered a weird issue with one of my Drupal 7 sites today.
I am using the default .htaccess rewrite rule to redirect from example.com to www.example.com and it works just fine.
Now though I have discovered that google has some SEPRs for the site to www.ww.example.com. They work just fine and the page opens, but it also means the visitor gets stuck with www.ww.example.com for every internal link on the whole site.How can I catch this in the .htaccess rewrite rule?
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.ww\.example\.com$ [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]