I have a simple rewrite rule as follows:
<rule name="short url" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_URI}" pattern="redirect(.*)" negate="true" />
<add input="{REQUEST_URI}" pattern="pages(.*)" negate="true" />
</conditions>
<action type="Redirect" url="/redirect?page={R:1}" appendQueryString="true" logRewrittenUrl="true" />
</rule>
However, if a put a breakpoint in our code on the redirect target page it gets hit twice.
Why would this happen?
Copyright Notice:Content Author:「Andrew Lindemulder」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39167588/iis-rewrite-rule-seems-happens-twice