One day I'll understand routing but this is what I have:
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("favicon.ico");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{LicenceCode}", // URL with parameters
new { controller = "Home", action = "Index", LicenceCode = UrlParameter.Optional } // Parameter defaults
);
}
If I go to http://localhost all is ok
If I go to http://localhost/Home/Index/1234 all is ok
if I go to http://localhost/1234 it 404's
I tried Phil Haack's route debugger but because it throws a 404 the route debugger doesnt work.
What do I have to do In RegisterRoutes for http://localhost/1234 to work