ServerAdmin chris@seagul.co.uk
ServerName thanetcommercials.co.uk
ServerAlias www.thanetcommercials.co.uk
DocumentRoot /home/chrisroos/www/thanetcommercials.co.uk
AllowOverride All
allow from all
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
RewriteEngine On
# Remove www
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^/(.*)$ http://thanetcommercials.co.uk/$1 [R=301,L]
# Permanently (301) redirect /index.html to / (regex copied from http://www.webmasterworld.com/apache/3155094.htm)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ $1 [R=301,L]