开发者

How to I exempt my old home page from a directory-wide redirect in htaccess?

I'm trying to exempt my old home page from a directory-wide redirect in htaccess. Here's what I have that isn't working. What am I doing wrong?

Options +FollowSymlinks
Rewri开发者_运维百科teEngine on

RewriteCond %{http_host} ^old.com?$ [nc]
RewriteCond %{REQUEST_URI} !^index\.html$
RewriteRule ^(.*)$ http://www.new.com/archive?id=$1 [r=301,nc]


try a / for the request_uri, ie.

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{http_host} ^old.com?$ [nc]
RewriteCond %{REQUEST_URI} !^/index\.html$
RewriteRule ^(.*)$ http://www.new.com/archive?id=$1 [r=301,nc]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜