0
如何将所有流量从test /(.*)重定向到http://newdomain.com/test/ $ 1?我试过了,但没有奏效:RewriteRule ^test/(.*) http://domain.com/test/ $1 [R=301,L]
将URL重定向到新URL
如何将所有流量从test /(.*)重定向到http://newdomain.com/test/ $ 1?我试过了,但没有奏效:RewriteRule ^test/(.*) http://domain.com/test/ $1 [R=301,L]
将URL重定向到新URL
我想,你需要一个斜杠添加到规则中的开头:
RewriteRule ^/test/(.*) http://domain.com/test/$1 [R=301,L]
在重写规则之前添加行RewriteEngine On
。
可能是一个错字,但你的意思是重定向到domain.com或newdomain.com? – 2011-04-16 09:07:19