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

John Craven jc at ukzone.com
Mon Oct 19 08:21:48 UTC 2009


Hi Smylers..

Unfortunately I'm thick.
I don't fully understand all the code that's in the script.
I checked on http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html and it put me in the right direction.
Then I just applied the code and checked if it worked.

John C

>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
>
>_______________________________________________
>Wylug-help mailing list
>Wylug-help at wylug.org.uk
>https://mailman.lug.org.uk/mailman/listinfo/wylug-help 

=================================================

  Check out our British Country Music Web Sites 

        http://www.countrymusic.org.uk
        http://www.bcmi-radio.co.uk
        
  Over 300,000 visitors a week

=================================================




More information about the Wylug-help mailing list