I am doing a return RedirectToAction("Index", "Clients");
from my home controller.... It is fine but my url looks like http://localhost:1115/Clients/Index
... How to remove index from url in asp.net mvc? Any suggestion....
My routes,
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Registrations",
"{controller}/{action}/{id}",
new { controller = "Registration", action = "Create", id = "" }
);
routes.MapRoute(
"Clients",
"Clients/{action}/{id}",
new { controller = "Clients", action = "Index", id = "" }
);
}
But still it doesn't seem to remove index
from my url...