0

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
{
    ...
}

1 Answer 1

2

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);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.