IIS重写模式匹配完全URL

itw*_*twb 1 iis rewrite url-rewriting

我已经运行了IIS7.5,并且我正在尝试匹配显式URL.以下代码不起作用.

 <rule name="presid" stopProcessing="true">
    <match url="(.*)" />
        <conditions>
            <add input="{REQUEST_URI}" matchType="Pattern" pattern="http://www.presid.com/presid" ignoreCase="true" negate="false" />
        </conditions>
    <action type="Redirect" url="http://www.domain.com/presid" />
  </rule>

I've also tried escaping the periods:
http://www\.presid\.com/presid
but that doesn't seem to work either.
Run Code Online (Sandbox Code Playgroud)

如何使用IIS7.5匹配特定的完整URL?

谢谢

这有效,但并不完全符合我的要求:(.*)/ presid,但我有破坏的图像:http://domain.com/images/presid/eee.jpg

我不希望该图像被重定向.

itw*_*twb 6

REQUEST_URI不包含主机名.

改用它:

<add input="{REQUEST_URI}" matchType="Pattern" pattern="^/presid$" ignoreCase="true" negate="false" />
Run Code Online (Sandbox Code Playgroud)