I have released a new version of my web site under /v2/ and now I want a .htaccess rule that redirects everyone from / to /v2/ except if the referrer is /v2/ (because I want to give a visitor of my new site the possibility to visit my old page but noone else). I tried this code but it doesn't work (infinite loop):
How can I get this to work?Code:# Checks if the referrer from my new site is being sent RewriteCond %{HTTP_REFERER} ^http://www\.domain\.tld/v2/ [NC] # Allows access to my old page and skips the next rule (S=1) RewriteRule (.*) http://www\.domain\.tld/ [R,S=1] # Redirects everyone else from the old to the new site RewriteRule Redirect / domain\.tld/v2/
Thanks


Reply With Quote
Bookmarks