protected virtual void Application_BeginRequest(Object sender, EventArgs e) { if (!string.IsNullOrEmpty(Config.HostName) && Request.Url.Host != Config.HostName) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location", "http://" + Config.HostName + Request.Url.PathAndQuery); CompleteRequest(); return; } Routing.DoRequest(Context, this); }
protected virtual void Application_BeginRequest(Object sender, EventArgs e) { Routing.DoRequest(Context, this); }