I have two domains:
mydomain.com and mydomain.fr
They both correspond to the same IP address.
I want users typing mydomain.com to view page A (Controller = "Application" Action = "A" ) and users typing mydomain.fr to view page B (Controller = "ApplicationFR" Action = "B" )
I am using ASP.NET MVC 3 and the default route is mapped to page A.
How can I achieve this ?
EDIT:
I tried to use the example provided but it seems not to work. Is it the right way to register the custom route ?
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.Add(new ExampleRoute());
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Application", action = "B", id = UrlParameter.Optional } // Parameter defaults
);
}