I have a public page that has client side routing. I would like all urls of the form Public/*
to be routed to PublicController/Index
.
I tried this:
routes.MapRoute(
name: "Public",
url: "Public/{clientRoute}",
defaults: new { controller = "Public", action = "Index", id = UrlParameter.Optional }
);
and this works for urls of type Public/someRoute
but does not work for a url of the form Public/someRoute/secondRoute
or for Public/someRoute/secondRoute/thirdRoute
etc.