I am redesigning a site but one of the requirements I was given after starting the development with MVC5 is keeping the current URL structure intact.
The site is all designed but I am now looking for a way to use routes to build out these URLs.
I have seen a ton of posts and tutorials explaining the standard:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
and some slight variations on it, like:
{controller}/{action}/{name}
But none to create the long folder dense structure I am trying to keep.
(Coded for formatting)
[http://www.domain.com/menu/.Dessert....../.Ice-Cream......./.Flavor-Ice-Cream/]
[http://www.domain.com/menu/{categoryName}/{subCategoryName}/{productInThisSubCategory}]
Some have a deeper folder structure, too.
I am sure there is an easy way to do this, but....