protected void Application_BeginRequest(Object sender, EventArgs e) { HttpApplication app; app = (HttpApplication)sender; if (Request.Url.Scheme == "http") { var path = "https://www.new-url.com"; Response.Status = "301 Moved Permanently"; Response.AddHeader("Location", path); break; } }
break
return
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)