1
我想重定向我的舊地址www.informarea.it/BlogEngine新址www.informarea.it ...重定向blogengine.net(Global.asax中)永久301
* 我的Global.asax blogengine.net的是*
void Application_BeginRequest(object source, EventArgs e)
{
HttpApplication app = (HttpApplication)source;
HttpContext context = app.Context;
// Attempt to perform first request initialization
FirstRequestInitialization.Initialize(context);
}
* 我可以永久應用重定向的代碼? *
if (app.url.ToString().ToLower().Contains("http://www.informarea.it/BlogEngine"))
{
HttpContext.Current.Response.Status = "301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",url.Replace("http://www.informarea.it/blogengine", "http://www.informarea.it"));
}
有人能幫助我嗎? 非常感謝 法布里