Enable Extensionless Urls in IIS 7.0 & 7.5

The cool thing to do these days is extensionless Urls, meaning there is no .aspx, .html, etc. Instead you just reference the resource by the name, which makes things like Restful interfaces and SEO better. For security reasons IIS disables this feature by default.

Recently I was working with some code where extensionless Urls were being used by the original developer. Since I typically do not work against the local IIS 7.5 installation when writing code I was stuck because I kept getting 404 responses for an oData resource. At first I did not realize the site was using IIS 7.5 as the web server, I honestly thought it was using the development server, which is the standard option when using Visual Studio to develop a web site.

Once I realized the site was actually being deployed locally I was able to trace the issue and solve it. turns out you need to turn on Http Redirection. To do this you need to go into control panel and select 'Programs'. This will display multiple options, you need to look at the top group, 'Programs and Features'. In this group select 'Turn Windows features on or off'.

turn windows features on off

Now the 'Windows Features' dialog is displayed. This shows a tree view containing various components, but for this we want to drill into the Internet Information Services > World Wide Web Services > Common Http Features. By checking HTTP Redirection and the OK button you will enable extensionless Urls in IIS.

HTTP Redirection

I like IIS 7, but sometimes I really wish configuration was much simpler. I looked for a while in the IIS management interface for this setting and could not find it and honestly it has been a while since I configured this on my production server. So the answer was not obvious. I am just glad I found a Knowledgebase article to help me out. I hope this helps you out.

Share This Article With Your Friends!

We use cookies to give you the best experience possible. By continuing, we'll assume you're cool with our cookie policy.

Install Love2Dev for quick, easy access from your homescreen or start menu.

Googles Ads Facebook Pixel Bing Pixel LinkedIn Pixel