301重定向在很多地方都需要用到,也是
seo中常见的问题。比如确定首选域或更换网站域名的时候都要用到301重定向。301重定向的方法有好几种,拿ASP类网站来说有:首页301重定向和全站301重定向。
<%if request.ServerVariables("SERVER_NAME")="mylinkwo.com" then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.mylinkwo.com/"
Response.End
end if
%>
备注:网站访问必须为动态的index.asp,如果是静态就不行了!