user626930
user626930

Reputation:

"Rewrite Action" 404 Server Error! (IIS 7.0 MS URL Re-Write Module)!

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

Answers (1)

Carlos Aguilar Mares
Carlos Aguilar Mares

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

Related Questions