Url Rewrite in IIS 7.5 causes Internal server error
I have a web application runs @ Windows 2008 R2, ASP.NET v4.0.
I installed the Url Rewrite Module, and started to use it as shown in the official examples.
My problem starts when the <rewrite>
tag is added to the web.config under <system.webServer>
- actua开发者_开发知识库lly when I try to browse to any page under this current application, I get 500 - Internal server error
.
This is the <rewrite>
block I've been adding:
<system.webServer>
<rewrite>
<rules>
<rule name="test1">
<match url="^default/([0-9]+)/([_0-9a-z-]+)" />
<action type="Rewrite" url="default.aspx?id={R:1}&title={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>
Just had same error and found a fix. You need to install the module for IIS for URL rewrite. you can dowload it here: http://www.iis.net/download/URLRewrite
Cheers,
I had the Url Rewrite Module 2.0 installed as well. However, at some point I had also uninstalled and re-installed iis7, so I believe the rewrite module wasn't registered properly within iis. I was getting the same error as above, even if I just added an empty set of tags to the web.config.
My solution was to uninstall the Url Rewrite Module (through Programs and Features) and reinstall it using the Web Platform Installer. I stopped iis7 during the install (not sure if it mattered). I did not need to reboot.
i resolve uninstalling Url Rewrite Module 2.0 from exe installer , installing web plataform from https://www.microsoft.com/web/downloads/platform.aspx, then go to products on web plataform and there, install url rewriter module. On windows 7 x86, iis 7.
Installer of URL Rewrite Module extension installs the schema of rewrite section defined in file C:\Windows\System32\inetsrv\config\schema\rewrite_schema.xml.
精彩评论