I am trying to use routing to redirect my user to another URL, if he enters my website through the IP address.
Or if possible please tell me if it possible to handle domain name by routing. As I can use routing for Controller and for Action, but can I also handle Domain in there or not?
I am currently using it like following, but I am unable to handle Domain:
routes.MapRoute(
"Controller",
"Controller/{action}/{id}",
new { controller = "Controller", action = "Index", id = UrlParameter.Optional });