Skip to content

Instantly share code, notes, and snippets.

@ShawInnes
Created January 18, 2014 01:16
Show Gist options
  • Save ShawInnes/8484761 to your computer and use it in GitHub Desktop.
Save ShawInnes/8484761 to your computer and use it in GitHub Desktop.
MVC Default Route Config
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.LowercaseUrls = true;
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment