lowercase-dashed-route for ASP.NET MVC

ASP.NET MVC default routing is a little bit ugly. Internet users are not used to upper case URLs, and what’s more uppercase urls tend to create issues. Applications developed on Microsoft technologies are case-insensitive, so yoursite.com/documents/view?id=1 is same with yoursite.com/Documents/View?id=1 but actually they are not.

router

Browsers consider those urls are different. If a user given a session for /Documents path with a cookie, that user will not be able to use that session under /documents path.

SEO is another reason for using dashed urls because they can be distinguished much more easily by the search engines and that helps ranking.

Because of those reasons, I’ve created a class library on GitHub at https://github.com/AtaS/lowercase-dashed-route

By using this library which is also available as a NuGet plugin, ASP.NET MVC URLs are implicitly converted into lowercase with dashes without doing any extra work, only a copy/paste setup into RouteConfig.cs is enough.

To install via NuGet type on Package Manager:  

Install-Package LowercaseDashedRoute

Please share!

 

Did you find it useful? Please share your thoughts below.