Using ASP.NET MVC4 Routing:
If I'd like to setup a Default routing configuration for the main section of the site:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
Then another routing configuration, something similiar to the following:
routes.MapRoute(
name: "FOO",
url: "FOO/{controller}/{action}/{id}",
defaults: new { controller = "FOO", action = "bar", id = UrlParameter.Optional }
);
Notice the string "FOO/" in the url (just before the /{controller...
For example, I'd like to be able to access the main section of my site using a url like the following
http://dummyurl.com/bar/1
but then access controllers and actions that have identical names if I was to use
http://dummyurl.com/**FOO**/bar/1