页面的跳转

asp.net默认的情况使用redirect,其状态为302,这个跳转对搜索引擎来说是一个临时跳转。如果我们需要对搜索引擎更友好,就要使用301的跳转,在

asp.net使用301跳转 要这样写代码:

Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.xxxx.com");
Response.End();
最后一句Response.End()不能省略 :)

转载于:https://www.cnblogs.com/dotLive/archive/2008/02/14/1068609.html

猜你喜欢

转载自blog.csdn.net/weixin_33868027/article/details/93765138