ASP.NET MVC Routes: How do I omit “index” from a URL
I have a controller called "StuffController" with a parameterless Index action. I want this action to be called from a URL in the form mysite.com/stuff My controller is defined as public class StuffController : BaseController { public ActionResult Index() { // Return list of Stuff } } I added a custom route so the routes are defined like this: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); // Custom route to show index routes.MapRoute( name: "StuffList", url: "Stuff", defaults: new { controller = "Stuff", action = "Index" } );