I'm having an issue getting the following syntax to work:
<rewriter>
<!-- This does NOTHING -->
<if url="whywontthiswork\.aspx" rewrite="/default.aspx" />
<!-- This redirects correctly -->
<redirect url="whywontthiswork\.aspx" to="/default.aspx" />
</rewriter>
As noted, the first rule does nothing no matter what I try. The X-Powered-By field on the response for that page request always says "ASP.NET". However, the second rewrite rule always works, and the X-Powered-By field on the response for that request is "ASP.NET,UrlRewriter.NET 2.0".
I believe that IIS is configured properly because it is handling the request correctly for <redirect />
. The issue is that I don't have any ideas why the first rewrite rule would not execute.
I have tried to search the documentation on UrlRewriter.NET, but at this time, it seems their site if offline or no longer in service. Any ideas?