0
Posted on 3:40 AM by Softminer and filed under ,

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();
	}
}
0
Responses to ... globa asx move permanantly 301 redirect without SEO decrease