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]
精彩评论