views:

183

answers:

2

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?

+2  A: 

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: http://serverfault.com/questions/76013/iis6-vs-iis7-and-iis7-5-handling-urls-with-plus-sign-in-base-not-querystri

Peter Seale
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.
Lex Li
A: 

I have the same issue on home/about

no characters. Even resorted to building the default project that VS 2008 gives you and I still get the same 404 error. Any ideas?

http://www.swikun.com/swimbikerun/Home/About

I have my 404s redirect back to the home page, that's why the error page does not display.

Paul