Skip to content

chrisnewark/TidyRouting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TidyRouting

What is TidyRouting?

TidyRouting is a small library that extends the ASP.NET MVC routing system to provide cleaner urls. Traditionally routes in ASP.NET MVC are created in proper-case with no trailing slash. This not only looks bad but is bad for SEO. TidyRouting makes sure that all urls are created in lower-case and are given a trailing slash.

For more information about the impacts on SEO take a look at http://www.searchenginejournal.com/url-capitalization-and-seo/12667/ and http://www.awebguy.com/2011/02/seo-trailing-slash/

How do I get started?

Once you have added TidyRouting to your project you simply need to replace your traditional route mappings with TidyRoute. For example,

using TidyRouting
...

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

    routes.MapTidyRoute( // changed from routes.MapRoute
        "Default",
        "{controller}/{action}/{id}",
        new { controller = "Home", action = "Index", id = UrlParameter.Optional }
    );
}

Where can I get it?

First, install NuGet. Then, install TidyRouting from the package manager console:

PM> Install-Package TidyRouting

About

Small library which provides extensions for the ASP.NET routing system providing cleaner urls that are lower-case and include a trailing slash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors