我正在运行IIS7.5,并尝试匹配一个明确的URL。以下代码无法工作。
<rule name="presid" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="http://www.example.com/presid" ignoreCase="true" negate="false" />
</conditions>
<action type="Redirect" url="http://www.example.net/presid" />
</rule>
我也尝试了转义句号:
http://www\.example\.com/presid
但似乎那也不起作用。我该如何在IIS7.5中匹配一个特定的完整URL?
这个方法可以使用,但并不能完全满足我的需求:(.*)/presid,而且会导致图片无法显示:
http://example.com/images/presid/eee.jpg
我不希望那张图片被重定向。