Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Url Rewrite in IIS 7.5 causes Internal server error

Tags:

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> - actually 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}&amp;title={R:2}" />             </rule>         </rules>     </rewrite> </system.webServer> 
like image 294
Gal V Avatar asked Jul 26 '10 07:07

Gal V


People also ask

How do I fix internal server error in IIS?

IIS error The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.


1 Answers

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,

like image 140
Ricardo M Avatar answered Sep 21 '22 15:09

Ricardo M