Is there any way I can match:
/a/myApp/Feature
/a/b/c/myApp/Feature
/x/y/z/myApp/Feature
with a route that doesn't specifically know what the path before myApp/Feature is?
What I essentially want to do is:
RouteTable.Routes.MapRoute(
"myAppFeatureRoute", "{*path}/myApp/Feature",
new { controller = "myApp", action = "Feature" });
but you can't put a catchall at the start of a route.
If I just try "{path}/myApp/Feature", that will match "/a/myApp/Feature" but not "/a/b/c/myApp/Feature".
I tried a regex catchall as well, that did nothing to help.
RouteTable.Routes.MapRoute(
"myAppFeatureRoute", "{path}/myApp/Feature",
new { controller = "myApp", action = "Feature", path = @".+" });
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.