title: .NET MVC routing - catchall at start of route?
body: <p>Is there any way I can match:</p>
  
  <pre><code>/a/myApp/Feature
  
  /a/b/c/myApp/Feature
  
  /x/y/z/myApp/Feature
  </code></pre>
  
  <p>with a route that doesn't specifically know what the path before myApp/Feature is?</p>
  
  <p>What I essentially want to do is:</p>
  
  <pre><code>RouteTable.Routes.MapRoute(
    "myAppFeatureRoute", "{*path}/myApp/Feature",
    new { controller = "myApp", action = "Feature" });
  </code></pre>
  
  <p>but you can't put a catchall at the start of a route.</p>
  
  <p>If I just try "{path}/myApp/Feature", that will match "/a/myApp/Feature" but not "/a/b/c/myApp/Feature".</p>
  
  <p>I tried a regex catchall as well, that did nothing to help.</p>
  
  <pre><code>RouteTable.Routes.MapRoute(
    "myAppFeatureRoute", "{path}/myApp/Feature",
    new { controller = "myApp", action = "Feature", path = @".+" });
  </code></pre>
  
  <p>The reason I'm doing this is that I am building a feature that is used in a CMS, and can sit anywhere in the site structure - I can only be certain about the end of the path, not the beginning.</p>