[Wylug-help] Apache .htaccess file.

John Craven jc at ukzone.com
Fri Oct 16 23:10:33 UTC 2009


Hi Doug...

This is a copy of my .htaccess file, and it works:

Options -MultiViews
RewriteEngine on

# send a 403 if .htaccess is requested
RewriteRule ^\.htaccess$ - [F]

# redirect any URLs that have "www."
RewriteCond %{HTTP_HOST} ^www.countrymusic.org.uk
RewriteRule (.*) http://countrymusic.org.uk/$1 [R=301,L] 

# send a 301 redirect if index.html is requested
RewriteRule ^index.html$ http://co


However, you want RewriteCond and RewriteRule the other way round, so just edit the file to suit.

i.e.

RewriteCond %{HTTP_HOST} ^countrymusic.org.uk
RewriteRule (.*) http://www.countrymusic.org.uk/$1 [R=301,L] 

hth

John C


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

  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