I have a MVC Web Application that runs on www.domain.com and I need to configure a different URL binding for another domain www.domain2.com for the
Agreed with the answer above.
If you want more beautiful implementation - try action filters. Sample of action filters usage from there.
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
var controller = (SomeControllerBase) filterContext.Controller;
filterContext.Result = controller.RedirectToAction("index", "home");
}
Sample of getting the URL inside action filter from there.
var url = filterContext.HttpContext.Request.Url;
Put the things together and have fun :)