I have the following routes defined:
routes.MapRoute(
"Content Pages",
"{action}",
new { controller = "Pages", action = "Index" });
routes.MapRoute(
"Default",
"{controller}/{action}/{id}/{title}",
new { controller = "Home", action = "Index",
id = UrlParameter.Optional,
title = UrlParameter.Optional },
new string[] { "MyCompany.Web.Controllers" });
I have a controller named Pages that has some actions like "About", "FAQ" etc that I would like to access like this: mywebsite.com/About
This currently works, but now all of my other controllers end up specifying their default action in the url. My action link for Books renders as mywebsite.com/Books/Index.
How can I modify my routes so that I can achieve this?