I installed Url Rewrite Module on IIS 7.5. The install went fine, and the GUI seems to be working just fine. The problem is, no redirection or rewriting is taking place. Its not showing up in the logs either. The site that I am trying to redirect rules
on is for a MVC.Net site with some custom routing controls. I don't know if this would mess with the Modules or not. Here is a copy of the Web.Config section for the Web.Server:
The rule will not work for your request. If you
use failed request tracing to trace the detailed rewrite process, you will see the rule failed due to pattern mismatch(the input url does not start with "/"). To make it work for you, you may update your pattern as "(.*/)?fin/(.*)" or other pattern that
will pass evaluation for the request.
haggis7777
2 Posts
Inbound rules not working.
Apr 10, 2012 02:42 AM|LINK
Hi,
I installed Url Rewrite Module on IIS 7.5. The install went fine, and the GUI seems to be working just fine. The problem is, no redirection or rewriting is taking place. Its not showing up in the logs either. The site that I am trying to redirect rules on is for a MVC.Net site with some custom routing controls. I don't know if this would mess with the Modules or not. Here is a copy of the Web.Config section for the Web.Server:
<system.webserver>
<validation validateintegratedmodeconfiguration="false">
<modules runallmanagedmodulesforallrequests="true">
<remove name="WebDAVModule">
</remove></modules>
<rewrite>
<rules>
<rule name="Fin rule" stopprocessing="true">
<match url="(.*)/fin/(.*)">
<action type="Redirect" url="{R:1}/fi/{R:2}" logrewrittenurl="true" redirecttype="Temporary"></action>
</match></rule>
</rules>
</rewrite>
</validation>
</system.webserver>
I called the page by the new rule and it doesn't redirect, it just gives a 404:
2012-04-10 01:59:32 209.239.114.39 GET /fin/features - 80 Admin 98.174.229.152 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:11.0)+Gecko/20100101+Firefox/11.0 404 0 0 327
Any help would greatly be appreciated, as I have been struggling with this for a week or more.
Regards,
Ray Simpson
Lloydz
2335 Posts
Microsoft
Re: Inbound rules not working.
Apr 11, 2012 02:58 AM|LINK
Hi,
The rule will not work for your request. If you use failed request tracing to trace the detailed rewrite process, you will see the rule failed due to pattern mismatch(the input url does not start with "/"). To make it work for you, you may update your pattern as "(.*/)?fin/(.*)" or other pattern that will pass evaluation for the request.
Thanks.
haggis7777
2 Posts
Re: Inbound rules not working.
Apr 11, 2012 03:04 AM|LINK
Lloydz,
Thank you for responding. I updated the slash and the rule appears to be working correctly now. Thank you for your response.
Regards,
Ray Simpson