0
protected void Application_BeginRequest(object sender, EventArgs e) { String fullOrigionalpath = Request.Url.ToString(); if (fullOrigionalpath.Contains("?p=")) { string website = "http://" + Request.Url.Authority; Response.Clear(); //Response.StatusCode = 301; Response.Status = "301 Moved Permanently"; //Response.Redirect(fullOrigionalpath.Replace("default.aspx?p=", "") + "/"); Response.AddHeader("Location", website + "/" + Request.QueryString["p"].ToString() + "/"); Response.End(); } }
Post a Comment