我正在嘗試編寫一個IIS Url重寫規則,該規則重定向除了兩個以外的所有請求,並且我無法弄清楚。URL rewrite multiple excluded
我試圖做到: 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>
任何幫助表示讚賞!
真棒,謝謝!這就說得通了。 – Trondh