PDA

View Full Version : Rewrite rules won't 'take'


radixhound
09-10-2009, 01:35 AM
Hi,

I'm experiencing a royal pain with a virtual host. I deleted it earlier today and re-created it. Now I've re-set the rewrite rules and they are not 'taking'. I keep editing the rule and the result doesn't change. For example, I changed it to redirect from www.mysite.ca to mysite.ca but it's not doing that, it's still redirecting from mysite.ca to www.mysite.ca.

All I really need is the redirect from / to /home.

Is there any chance that some of the settings from the old deleted virtual host are still being remembered and over-riding the settings I'm putting in there?

This is all I'm trying to do... :confused:

RewriteCond %{HTTP_HOST} !^mysite\.ca$ [NC]
RewriteRule .* http://mysite.ca/ [L,R=301]

RewriteRule ^/$ /home [L,R=301]

auser
09-10-2009, 02:06 AM
try

RewriteCond %{HTTP_HOST} !^mysite\.ca$ [NC]
RewriteRule (.*) http://mysite.ca/$1 [L,R=301]

RewriteRule ^/$ http://mysite.ca/home [L,R=301]