ISAPI重写语法

我有IIS 6.0,并使用ISAPI重写来做一个特殊的URLredirect。

基本上这将如何运作,任何人去www.website1.com被redirect到www.website2.com,我已经设置了以下几行:

RewriteCond %{HTTP:Host} ^website1\.com$ RewriteRule (.*) http\://www\.website2\.com [NC,R=301] 

但是,我想从重写规则中排除2个URL:
– www.website1.com \ Mar \ healthcheck.html
– www.website1.com \ Mar \ servname.html

我会添加到我目前的configuration,让人们通过这两个url? 理想情况下,只允许任何人通过www.website1.com \ Mar \ *。

谢谢

 RewriteCond %{HTTP:Host} ^website1\.com$ RewriteCond %{REQUEST_URI} !/Mar/healthcheck.html RewriteCond %{REQUEST_URI} !/Mar/servname.html RewriteRule (.*) http\://www\.website2\.com [NC,R=301] 

就像这样,语法在这里: http : //www.isapirewrite.com/docs/#RewriteCond

该指南说,除非在Cond声明中绝对必要,否则不应该使用^$ vars。