If I have the following URL:
/ someurl
And I have two domain names:
us.foo.com
au.foo.com
I want this to be 200 (coincidence):
us.foo.com/someurl
But this is to 404 (does not match):
au.foo.com/someurl
The route is as follows:
RouteTable.Routes.MapRoute( "xyz route", "someurl", new { controller = "X", action = "Y" } );
I assume that there are no route values, I can not restrict the host based URL? It is right?
If so, how can I do this, except for the following (ugly) in action:
if (cantViewThisUrlInThisDomain) return new HttpNotFoundResult();
Does anyone have any ideas?
I assume that I am looking for a way to restrict the route through its domain, and not a route marker, if that makes sense.
source share