Rewrite rules won't 'take'

Discussion in 'Install/Configuration' started by radixhound, Sep 10, 2009.

  1. radixhound

    radixhound New Member

    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:

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

    auser Super Moderator

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

Share This Page