网站换了新域名,老域名如何通过跳转将老域名下的所有联接跳转到新域名的相应位置?

我的网站原来用的是www.91chem.com域名,现在换成了www.jishuzaixian.com域名,那么原来的www.91chem.com域名有很多被搜索引擎收录的信息如何跳转到新域名的相应位置?

如:老域名www.91chem.com有很多像下面
http://www.91chem.com/jishu/html/newlist-1.html
http://www.91chem.com/jishu/html/496_3.html
http://www.91chem.com/jishu/html/602_2.html
http://www.91chem.com/jishu/html/486_2.html
这样的联接,如何跳转到新域名www.jishuzaixian.com相应的
http://www.jishuzaixian.com/jishu/html/newlist-1.html
http://www.jishuzaixian.com/jishu/html/496_3.html
http://www.jishuzaixian.com/jishu/html/602_2.html
http://www.jishuzaixian.com/jishu/html/486_2.html

或能实现像
http://www.91chem.com/jishu/html/newlist-1.html
http://www.91chem.com/jishu/html/496_3.html
这样的联接都跳转到
http://www.jishuzaixian.com 最域名的顶级目录也行

像这样的问题如果通过程序或其它的办法实现?
我的空间是买别人的虚拟主机空间,服务商不给提供!该怎么实现?
我尝试了,下面的
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.jishuzaixian.com/"
%>
这种方式,可以实现301重定向到首页,但满足不了我的需求:
当输入 http://www.91chem.com/jishu/html/496_3.html
自动跳转到 http://www.jishuzaixian.com/jishu/html/496_3.html
网上查到可能通过下面方式实现:
<%
Response.Status ="301 Moved Permanently"
Response.AddHeader "Location","http://www.jishuzaixian.com/"&Request.ServerVariables("HTTP_X_REWRITE_URL")
%>
但是通过实际测试没有成功

本人绝不像 回答者:mujianhua87说的“你玩电脑的 这个都不会 忽悠我们呢” 我喜欢研究这方面的东西,但确实这个不会操作!还望高手指点!

若有能帮着解决的可再增加50悬赏分

第1个回答  2010-01-14
做一个301转向就好了.

设置301转向的方法:

1、IIS下301设置

Internet信息服务管理器 -> 虚拟目录 -> 重定向到URL,输入需要转向的目标URL,并选择"资源的永久重定向"。

2、ASP下的301转向代码

<%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.mydomain.cn" %>

3、ASP.Net下的301转向代码

<script runat="server"> private void Page_Load(object sender, System.EventArgs e) { Response.Status = "301 Moved Permanently"; Response.AddHeader("Location","http://www.mydomain.cn/articles/301/"); } </script>

4、PHP下的301转向代码

header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.mydomain.cn/articles/301/"); exit();

5、CGI Perl下的301转向代码

$q = new CGI; print $q->redirect("http://www.new-url.com/");

6、JSP下的301转向代码

<% response.setStatus(301); response.setHeader( "Location", "http://www.mydomain.cn/" ); response.setHeader( "Connection", "close" ); %>

7、Apache下301转向代码

新建.htaccess文件,输入下列内容(需要开启mod_rewrite):

1)将不带WWW的域名转向到带WWW的域名下

Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.cn [NC] RewriteRule ^(.*)$ http://www.mydomain.cn/$1 [L,R=301]

2)重定向到新域名

Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.mydomain.cn/$1 [L,R=301]

3)使用正则进行301转向,实现伪静态

Options +FollowSymLinks RewriteEngine on RewriteRule ^news-(.+)\.html$ news.php?id=$1

将news.php?id=123这样的地址转向到news-123.html

8、Apache下vhosts.conf中配置301转向

为实现URL规范化,SEO通常将不带WWW的域名转向到带WWW域名,vhosts.conf中配置为:

<VirtualHost *:80> ServerName www.mydomain.cn DocumentRoot /home/lesishu </VirtualHost>

<VirtualHost *:80> ServerName mydomain.cn RedirectMatch permanent ^/(.*) http://www.mydomain.cn/$1 </VirtualHost>

参考资料:www.k0573.com

本回答被提问者采纳
第2个回答  2010-01-15
直接做个解析就OK了,A->B
第3个回答  2010-01-25
一般的虚拟空间里也提供这个301重定向服务的,是否先去询问一下主机供应商?
第4个回答  2010-01-20
是不是可以在网站程序里设置下那! 欢迎您来北京网联中国注册域名。
第5个回答  2010-01-16
你玩电脑的 这个都不会 忽悠我们呢