how to remove the controller name from the url using rout in MVC [duplicate]
This question already has an answer here: ASP.NET MVC - Removing controller name from URL 5 answers How to remove the controller name from the URL in MVC 5. I tried to add the route in the route.config public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapMvcAttributeRoutes(); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); routes.MapRoute( name: "Special", url: "action/{id}", defaults: new {