Extensionless URLs Not Found

by Adam 30. January 2012 16:03

If you ever set up a website which makes use of the extensionless URLs then you may have come across a problem where the page www.yourgreatsite.com/Home cannot be found but www.yourgreatsite.com/Home.cshtml works perfectly.

The problem is that, by default, IIS is not set up for URL rewriting. So you need to enable it. If using a shared host, like I was, then you should add the following to your web config file...

<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

IF your hosting your own site or you have more control over IIS then you can enable URL rewriting yourself.

About Qwerty.ie

Qwerty.ie is all about technology; news, coding and life. Catching the overspill from one man's mind and blending it with everything from news, information, coding guides, tips and general ramblings before splattering it across the pages of a Blog. Which Blog, you ask? This Blog! Now with pictures and technicolor.

Keep up-to-date with all the latest Qwerty thoughts by subscribing to Qwerty.ie and find out what feeds the Blog in Qwerty's Articles of Interest.

Email Qwerty.ie  Subscribe to Qwerty.ie

All Rights Reserved - Qwerty.ie