More information about the Underscore mailing list

[_] Non www to www

Oliver Humpage oliver at watershed.co.uk
Fri Dec 18 11:28:44 GMT 2009

On 18 Dec 2009, at 11:23, Leo Pitt wrote:

> The syntax examples I see for that bit of .htaccess are
>
> RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # Note the backslash in  
> the URL
> RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
>
> ... So could be that you need to add "\"'s to escape the periods in  
> the URL?

A period will match a period fine, it just might match other things as  
well. So all foo.co.uk will do is also match fooXcoYuk as well.

Escape to make sure it only matches what you want, but if anything the  
lack of \s will make it work "too" well rather than less.

Oliver.