using System.Web.Mvc; using System.Web.Routing; namespace Website { public class ApplicationRoutes { private readonly RouteCollection routes; public ApplicationRoutes(RouteCollection routes) { this.routes = routes; } public void Register() { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{config}.config/{*pathInfo}"); routes.MapRoute("Authentication", "{action}.mvc", new { controller = "Members" }, new { action = "(login|logout)" } ); routes.MapRoute("Homepage", "home.mvc", new { controller = "Home", action = "Index" } ); routes.MapRoute("ContentPages", "about.mvc/{pageName}/{section}", new { controller = "Home", action = "ContentPage", section = "" } ); routes.MapRoute("Content Administration", "admin.mvc/content/{action}/{id}", new { controller = "ContentAdministration", action = "Index", id = "" } ); routes.MapRoute("Default", "{controller}.mvc/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); } } }