BluRayCD Forum

 找回密码
 立即注册【分享大片】
查看: 591|回复: 0
收起左侧

[空间技术] windows虚拟主机/独立服务器 利用404.asp 实现301永久重定向

[复制链接]

410

主题

177

回帖

1万

积分

Forum CEO

金币
2568 枚
体力
11857 点
kmxmxy 发表于 2011-7-13 04:02:58 | 显示全部楼层 |阅读模式
1.独立服务器

1.jpg

2.虚拟主机

2.jpg

3.404.asp源代码
  1. <%
  2. dim s,t:s=Replace(Replace(request.querystring,"404;",""),":80/","/"):t=s
  3. s=replace(s,"老域名","新域名")
  4. 'response.write s
  5. if t<>s then
  6. Response.Status="301 Moved Permanently"
  7. Response.AddHeader "Location",s
  8. else
  9. Response.Status="404 Not found"
  10. end if
  11. %>
复制代码
放在你网站的根目录即可
您知道吗,申请VIP会员可以免回复下载,无广告骚扰, 点此处申请

本版积分规则

小黑屋|手机版|Archiver|4K蓝光论坛

GMT+8, 2024-5-19 13:40

Copyright © 2001-2021, Gadaddy Cloud.

快速回复 返回顶部 返回列表