0

I am unsure if my title was accurate enough. I am trying to make SEO URLs for my website which is developed in ASP.NET MVC. I configured my route to include:

routes.MapRoute(
                "Default",                                                          // Route name
                "{controller}/{action}/{id}/{seo}",                                 // URL with parameters, SEO will up completely optional and used for strings to provide Search Engine Optimization.
                new { controller = "Home", action = "Index", id = "", seo ="" }     // Parameter defaults
            );

On my development machine, a link like:

http://localhost:1048/Home/Post/96/Firefighting+ATV+Concept+Twin+Water+Cannons+Gull

works fine, but once I published to the server (Windows 2008 R2 IIS), it doesn't work. For example, the link:

http://www.otakuwire.net/Home/Post/96/Firefighting+ATV+Concept+Twin+Water+Cannons+Gull

gives me a 404.

Is this a routing issue, or some other issue?

1
  • What version of .NET is the server configured to use? Commented Dec 3, 2009 at 21:43

1 Answer 1

2

This is an IIS issue, not routing. IIS7 is strict in how it deals with the plus symbol + in URLs. The easy fix is to use the dash - instead like everyone else, or be bold and use the space character (which, personal note, looks horrible in the IE address bar).

On ServerFault they present a configuration-based solution to allow + symbols: https://serverfault.com/questions/76013/iis6-vs-iis7-and-iis7-5-handling-urls-with-plus-sign-in-base-not-querystri

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, you received 404.<something> actually, which was returned by IIS Request Filtering feature. It blocks several patterns of URL including the one you showed.

Your Answer

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