[support] Inlinks with www.ww.[domain] gets stuck, how to redirect in .htaccess?
Jeff Brown
jeff at wildcoast.com
Fri Jan 20 15:04:55 UTC 2012
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20120120/43f23c43/attachment-0001.html
More information about the support
mailing list