我把我的网站从/ V1的/ etc ...目录复制到/ V2 /等..目录,并想使htaccess的永久重定向。有人可以帮我吗?
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?
您可以使用的mod_rewrite :
RewriteEngine on
RewriteRule ^v1(/.*)?$ /v2$1 [L,R=301]
或者 mod_alias中:
Redirect permanent /v1 /v2