views:

464

answers:

2

I'm using asp.net MVC on IIS 7 / windows 2008 server.

The problem is that asp.net mvc generates urls with no slash at the end, like: http://site.com/category/asp. When this url is clicked, IIS 7 probably thinks its a directory and issues a 302 redirect to http://site.com/category/asp/ (with the end slash). How do i change this? I do not want an extra redirect overheat. This does not happen on the Visual Studio web server. Also doesn't happen on nerddinner.com.

+2  A: 

You can probably use URL rewriting in IIS7 to help here. Take a look at the article that Scott Hanselman wrote on the issue:

http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx

casperOne
A: 

I think this is not the way, since the web server on Visual Studio doesn't use rewriting and the urls works there with no 302 redirect. Also, i don't think nerddinner.com is using IIS rewrite..

thanks