独立服务器
虚拟主机
<%
dim s,t:s=Replace(Replace(request.querystring,"404;",""),":80/","/"):t=s
s=replace(s,"老域名","新域名")
'response.write s
if t<>s then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",s
else
Response.Status="404 Not found"
end if
%>
复制代码
放在站点根目录
注意:
s=replace(s,"老域名","新域名")
老域名、新域名都不要包含http: