I moved my website from the /v1/etc... directory to the /v2/etc... directory and would like to make a permanent redirect in htaccess. Can someone help me?
+1
A:
RewriteEngine On RewriteRule /v1/(.*) /v2/(.*) [R=301,L]
in your .htaccess
dweeves
2010-03-18 20:01:08
what a moron, it put .* in the redirected value instead of $1 :)
dweeves
2010-03-18 20:04:10
+3
A:
You can use either mod_rewrite:
RewriteEngine on
RewriteRule ^v1(/.*)?$ /v2$1 [L,R=301]
Or mod_alias:
Redirect permanent /v1 /v2
Gumbo
2010-03-18 20:03:03