301是不需要空间支持的,如果你只是更换域名的话可以按照现在的方法去做(以为PJBlog博客网站更换域名为例):
1、在虚拟主机控制面板绑定新的域名,我们假设新域名为 new.com 旧域名为 original.com
2、由于PJBlog的header.asp是所有页面都使用的,所以只需要在header.asp中做如下修改:
在header.asp的最前部添加如下代码:
复制内容到剪贴板
代码:
Dim referalURL
referalURL = Request.ServerVariables("http_referer")
If inStr(referalURL,"original.com") Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",Replace(referalURL,"origianl.com","new.com")
Response.End
End If然后你再到
http://seo.g2soft.net/online-tools/server_status_checker.php 输入你原来的域名看看是否返回 301 代码。如果是则替换成功,下次蜘蛛来过之后即可撤掉旧域名。
还可以试试把上面的代码加到conn.asp里试试
[
本帖最后由 dudo 于 2008-6-6 16:34 编辑 ]