I am tasked with creating some rewrite rules for a .Net MVC site in IIS 7.5. I installed the Url Rewrite Module, and configured a couple of very simple rules without success.
So my first question is, in which order does IIS process the incoming url?
Is it Incomming URL –> URL Rewrite –> rewrite the Url –> .Net MVC Routing Manager gets the updated URL?
If not then in which order does it process it and how can I get the URL Rewrite to process the URL first?
There is a checkbox that says “Log rewritten URL”, does this log to the IIS log or is this for something else?
Here is the rewrite inbound rule I created:
Pattern: (.*)/fin/(.*)
Rewrite URL: {R:1}/fi/{R:2}
Any help is greatly appreciated.
Update: 4/5/2012
I still can’t get it to work on the system. I tried hitting it via the Localhost to eliminate proxy’s and load balances and it still won’t work. I installed it to another machine, and it works like a champ. Any suggestions would be greatly appreciated.
** Update: 4/6/2012**
I still haven’t tracked down the problem, but I wonder if my web.config for my MVC app is causing any problems. Does it appear that these statements in the web.config could be causing this?:
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
April 11, 2012 Update
URL Rewrite Module is actually installed correctly. Did some very basic tests and they worked. Discovered that my regular expression for my rule was incorrect (had an extra slash) and I needed to do an IISReset. If anybody else finds this post, make sure your redirect rules are correct, and do a very simple basic test to verify its working.