Yes, We can use multiple URLs to the same action with the use of a routing table. foreach(string url in urls)routes.MapRoute("RouteName-" + url, url, new { controller = "Page", action = "Index" });
You can map URL by giving two different key name and specify the same action and same controller in RegisterRoutes() Method.
routes.MapRoute( name: “myRoute”, url: “Home/{pageName}”, defaults: new { controller = “Home”, action = “Index”, pageName = UrlParameter.Optional } );
routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapRoute(name: "categories",url: "categories",defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });routes.MapRoute(name: "products",url: "products",defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });routes.MapRoute(name: "Default",url: "{controller}/{action}/{id}",defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional });