title: How can I configure sub routes in MVC
body: <p>I have a service in my website that loads content blocks from an external provider, from which users are are able to click links and navigate.  </p>
  
  <p>My routing needs to be able to handle these by calling my home controller with the request path.</p>
  
  <p>For example, the url they will use to navigate will be </p>
  
  <pre><code>www../shop/hire/category/subcategory/subsubcategory/....
  </code></pre>
  
  <p>and if they're after a specific product:</p>
  
  <pre><code>www../shop/hire/category/subcategory/subsubcategory...?product=ABC
  </code></pre>
  
  <p>the constant in that, would be <code>/shop/hire/</code> with the categories changing based on where you are, and the product if they have found what they are actually after. </p>
  
  <p>The problem I've got, is when a link with a path like that is clicked in my application, rather than using the HomeController so I can parse the request, and call the service with the appropriate URL, I just get a 404.</p>
  
  <p>I've tried adding the route: </p>
  
  <pre><code>routes.MapRoute(
          name: "Category",
          url: "shop/hire/{categories}/{product}",
          defaults: new { controller = "Home", action = "Index", categories = UrlParameter.Optional, product = UrlParameter.Optional }
      );
  </code></pre>
  
  <p>but this doesn't seem to have had any effect.</p>