<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 20 Jan 2012, at 4:19 PM, Thomas Svenson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">    <font face="Helvetica, Arial, sans-serif">Hi,<br>      <br>      Discovered a weird issue with one of my Drupal 7 sites today.<br>      <br>      I am using the default .htaccess rewrite rule to redirect from      example.com to <a class="moz-txt-link-abbreviated" href="http://www.example.com">www.example.com</a> and it works just fine.<br>      <br>      Now though I have discovered that google has some SEPRs for the      site to <a class="moz-txt-link-abbreviated" href="http://www.ww.example.com">www.ww.example.com</a>. They work just fine and the page      opens, but it also means the visitor gets stuck with      <a class="moz-txt-link-abbreviated" href="http://www.ww.example.com">www.ww.example.com</a> for every internal link on the whole site.</font></div></blockquote></div><div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><font face="Helvetica, Arial, sans-serif">            How can I catch this in the .htaccess rewrite rule?<br></font></div></blockquote><div><br></div><div><br></div><div>RewriteCond %{HTTP_HOST} ^example\.com$ [NC]</div><div>RewriteRule ^(.*)$ <a href="http://www.example.com/$1">http://www.example.com/$1</a> [L,R=301]</div><div><br></div><div>RewriteCond %{HTTP_HOST} ^www\.ww\.example\.com$ [NC]</div><div>RewriteRule ^(.*)$ <a href="http://www.example.com/$1">http://www.example.com/$1</a> [L,R=301]</div><div><br></div><div><br></div><div><div><br></div></div></div></body></html>