Reputation: 11401
Is there a way to make http://myapp.com/Orders
, http://myapp.com/Pedidos
, http://myapp.com/Solicetudes
reach the same OrdersController
??? Maybe something like
[AlternativeNames("Pedidos","Solicitudes","Bla","Ble")]
public class HomeController : Controller
{
...
}
Upvotes: 0
Views: 86
Reputation: 3584
You can set this at the Route level.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("Content/{*pathInfo}");
routes.MapRoute("Order-Controller-Spanish", "Pedidos", new { controller = "Order" });
routes.MapRoute("Order-Controller-English", "Orders", new { controller = "Order" });
}
In your global.asax :
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
Upvotes: 2