Reputation:
Can anyone tell me why this is returning a 404 but works when I redirect it!
<rule name="Static All Paging" stopProcessing="true">
<match url="(.*)page-([0-9]+)$" />
<action type="Rewrite" url="{R:1}?P={R:2}" appendQueryString="true" />
</rule>
Upvotes: 1
Views: 4355
Reputation: 13591
The easiest thing to do is enable Failed Request Tracing and see the end-result of the URL Rewriting http://learn.iis.net/page.aspx/467/using-failed-request-tracing-to-trace-rewrite-rules/
There are a couple of things that could be happening but is hard to know. Are you sure both URLs are running in the Same Application Pool? That could be one reason why redirect works but not rewrite.
Upvotes: 4