title: Defining custom URL routes in ASP.Net MVC
body: <p>I have the following routes defined:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      routes.MapRoute(name: "Homepage", url: "", defaults: new { controller = "Restaurants", action = "Search" });
      routes.MapRoute(name: "About", url: "about", defaults: new { controller = "Home", action = "About" });
      routes.MapRoute(name: "Disclaimer", url: "disclaimer", defaults: new { controller = "Home", action = "Disclaimer" });
      routes.MapRoute(name: "Contact", url: "contact", defaults: new { controller = "Home", action = "Contact" });
      routes.MapRoute(name: "RestaurantDetails", url: "{id}/{slug}", defaults: new { controller = "Restaurant", action = "Details" });
      routes.MapRoute(name: "RestaurantLocationDetails", url: "{id}/{restaurantSlug}/{locationSlug}", defaults: new { controller = "Restaurant", action = "LocationDetails" });
      routes.MapRoute(name: "Api", url: "api/{action}", defaults: new { controller = "Api" });
  }
  </code></pre>
  
  <p>I found some routes to give a 404, so I installed the RouteDebugger NuGet package.</p>
  
  <p>It shows what I expect for the first 4 routs, but on the last 3 routes I still get a 404 and alas Route Debugger doesn't appear at the bottom of the page - I was hoping it would show me which bits got mapped, but I get nothing. All the views exist.</p>
  
  <p>So I'm assuming I'm making a mistake with the route definitions - can anyone shed any light on this? Also, how can I get Route Debugger to show me how the URL gets mapped into the route dictionary for those pages that return a 404?</p>