Redirect temporarily

93 Views Asked by At

I have a MVC site that I want redirected temporarily all traffic there to another MVC site. How can I do it without using IIS Manager which does not allow me to connect to the remote IIS server. I have an abstract class that inherits from the .Net Controller. All my controllers in the application inherit from the abstract class. Therefore, I am thinking to just do it in the abstract class so that I don't have to write redirect logic everywhere in the concrete controller classes. How can this be done? Any other suggestion that is pure MVC way? I am not looking for meta http-equiv="location" content="xxx" solution. Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

Problem solved. I used Application_Start() in Global.asax

protected void Application_Start(object sender, EventArgs args)
{
//HttpContext.Current.Response.Redirect("http://otherSite/appName");
}