开发者

Redirect URL to new URL

How do I redirect all traffic from test/(.*) to http://newdomain.com/test/$1? I tried this, but that didn't work: RewriteRule ^test/(.*) http://domain.com/test/$1 [R开发者_StackOverflow中文版=301,L]


I think, you need to add a slash to the beginning of the rule:

RewriteRule ^/test/(.*) http://domain.com/test/$1 [R=301,L]


Add the line RewriteEngine On before your rewrite rule.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜