7

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.

hlovdal
28.6k11 gold badges103 silver badges179 bronze badges
asked Mar 31, 2009 at 17:14

2 Answers 2

2

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

answered Mar 31, 2009 at 17:19
Sign up to request clarification or add additional context in comments.

Comments

0

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

answered Mar 31, 2009 at 22:01

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.