[Wylug-help] Fwd: Re: Apache .htaccess file.

Smylers Smylers at stripey.com
Mon Oct 19 07:52:36 UTC 2009


John Craven writes:

> I have been doing some experimenting to test your requirements and
> this code works for me:
> 
> # redirect any URLs that don't have "www."
> RewriteCond %{HTTP_HOST} !^www\.countrymusic\.org\.uk [NC]  
> RewriteCond %{HTTP_HOST} !^$  
> RewriteRule ^/?(.*)         http://www.countrymusic.org.uk/$1 [L,R,NE]

Ah, I wonder if that question mark after the slash is what Doug needs.
Possibly without it http://countrymusic.org.uk (without a trailing
slash) wouldn't match.

Smylers
-- 
http://twitter.com/Smylers2



More information about the Wylug-help mailing list