ASP.NET MVC Routing / SEO Friendly URL

I wrote a blog post on this a while back and thought it might be helpful:

http://web.archive.org/web/20170416234816/http://mynameiscoffey.com/2010/12/19/seo-friendly-urls-in-asp-net-mvc/

Basically you need to check in your action for the presence of the correct SEO-Friendly title when your action is executing, and if it doesn't find it, issue a redirect back to the browser to the correct SEO-Friendly URL.


That route looks like it should work with that call to ActionLink, so this is a bit of a guess. Are you registering your {action}/{id}/{title} route after the default route? If so, the default route will match first, and just put the title value in the querystring since it doesn't appear in the path. If you register your custom route before the {controller}/{action}/{id} default, it should work.