日期:2014-05-16 浏览次数:20692 次
void Application_BeginRequest(object sender, EventArgs e)
{
string FromHomeURL = "http://www.adidas.stooges.com.my";
string ToHomeURL = "http://adidas.stooges.com.my";
string a = HttpContext.Current.Request.Url.ToString().ToLower();
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains(FromHomeURL))
{
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",
Request.Url.ToString().ToLower().Replace(FromHomeURL, ToHomeURL));
}
}
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");/////////
HttpContext.Current.Response.AddHeader("Location",