使用301重定向可以把不带www的域名转向带www的域名,这样可以把权重全部指向带有www的域名,对网站优化很有帮助。
<% Dim Server_Name,Path_infostr,Query_Stringstr Path_infostr=lcase(request.ServerVariables("PATH_INFO")) Server_Name=lcase(request.ServerVariables("Server_Name")) Query_Stringstr=request.ServerVariables("Query_String") If Query_Stringstr<>"" Then Query_Stringstr="?"&Query_Stringstr IF instr(Server_Name,"www.")<1 Then Response.Status = "301 Moved Permanently" if instr(Path_infostr,"index")>0 or instr(Path_infostr,"default")>0 Then Response.AddHeader "Location","
http://www."&Server_Name Else Response.AddHeader "Location","http://www."&Server_Name&Path_infostr&Query_Stringstr End if Response.End End if %>
中国足彩网信息请查看IT技术专栏
2025国考·省考课程试听报名