【发布时间】:2018-01-06 02:21:06
【问题描述】:
我正在尝试编写一个 IIS Url 重写规则来重定向除两个之外的所有请求,但我想不通。
我想要完成的事情:
http://server/healthcheck.aspx --> not redirected
http://server/idsrv2/2/stuff --> not redirected
http://server/stuffstuff --> redirect to http://server/idsrv2/stuffstuff
这是我目前的规则,但它并没有生效:
<rule name="Redirect everything to idsrv/2" patternSyntax="Wildcard" stopProcessing="true">
<match url="^$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_URI}" pattern="^(.*)healthcheck" negate="true"/>
<add input="{REQUEST_URI}" pattern="^(.*)idsrv2" negate="true" />
</conditions>
<action type="Redirect" url="idsrv2{R:1}" appendQueryString="true"/>
</rule>
任何帮助表示赞赏!
【问题讨论】: