first:
I did read and tried to implemented this and this and that, but I failed completely :(
my route is like:
routes.MapRoute(
"DefaultRoute",
"{calurl}/{controller}/{action}/{id}",
new { calurl = "none", controller = "Subscriber", action = "Index", id = UrlParameter.Optional }
);
and I'm trying to use as
"{calurl}.domain.com",
"{controller}/{action}/{id}"
so the routed value calurl
would always come from the subdomain.
and I could have links like:
http://demo.domain.com/Subscriber/Register
as of today I have
http://domain.com/demo/Subscriber/Register
What I have tried
I tried to create my own CustomRoute
using the example of the links above (all 3, one at a time), and I end up always screwing everything.
and I'm keep thinking that it's to much code just to change RouteValue["calurl"]
to the subdomain.
What/How can I do this?