我在httpdocs
site_v1
site_v2
我想将整个域重定向到site_v2,但也要继续引用此
所以这会起作用
www.example.com -> gets into site_v2
www.example.com/site_v1/ -> gets into site_v1
www.example.com/site_v2/ -> gets into site_v2
这种重定向的htaccess指令怎么样?
答案 0 :(得分:2)
尝试此规则:
RewriteCond $0 !^(site_v1|site_v2)($|/)
RewriteRule .* site_v2/$0 [L]