开发者

exact syntax of RewriteRule

Do I need a slash before or after the /somefolder/(.*) below? I want to redirect everything coming into a folder to another website address. Do I need the RewriteCond in here somewhere also?

Options +FollowSymLinks
RewriteEngine on

开发者_C百科RewriteRule somefolder(.*) http://www.differentsite.com$1 [R=301,L]


You don't need a / at the beginning, but a caret ^ will match http://whatever.com/ including the trailing /.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜