[Wylug-help] Apache .htaccess file.

Douglas G Mckendrick douglasg.mckendrick at googlemail.com
Sun Oct 18 17:17:57 UTC 2009


Hi all, Thanks for your replies John and Smylers.  I have altered my
htaccess file as below, but it still isn't doing as I want. 

Looking at johns website, www remains at the front, so I don't think I
would need to change the rewrite cond and rule around.  Do I need to
omit the /www in the first rewrite cond rule?  so it points all
http://d(etc).co.uk to http://www.d(etc).co.uk?

Cheers

Doug

<IfModule mod_ssl.c>
	RewriteBase /d******.co.uk/
</IfModule>
<IfModule !mod_ssl.c>
	RewriteBase /
</IfModule>
	RewriteEngine On
	# And for a site running on port 80
	RewriteCond %{HTTP_HOST}   !^www\.d******\.co.uk [NC]
	RewriteCond %{HTTP_HOST}   !^$
	RewriteRule ^/(.*)         http://www.d******.co.uk/$1 [L,R]
        RewriteRule ^([^.]*)$ index.cgi/$1 [L,NE]
RewriteEngine On




More information about the Wylug-help mailing list