Csuper Blog

Csuper Blog

网站改域名换程序之各大论坛转discuz论坛后如何保住流量减少搜索引擎收录损失
2011-03-15

如何保障以前phpwind的收录失效访问问题,能够尽量保障平衡过渡。seo中最忌的一项就是变换网站程序,但怎么样减少损失,转换后有没有什么手法可以尽量弥补?404转向rewrite静态规则转换

有没有一种静态规则,可以使phpwind论坛的read-htm-tid-547653.html形式,转换为thread-547653-1-1.html,个人感觉应该有这种规则,只是苦于不会写这种规则,比较郁闷。另外,在phpwind论坛转换为discuz论坛方面,还有没有这方面的更好的建议和方法?

这个问题,比较典型,因此,专门搜集了一些实例来详细解说一下问题。更换域名,用301永久定向,这确实没有问题。更改站程序,用404失效页面转向,这也没问题,符合搜索引擎的规则,但就是对用户体验不好,会损失一定的流量和用户可信度。有没有更好的办法?

phpwind转Discuz!论坛后 保持搜索引擎带来的流量之rewrite 规则了,以IIS为例,以下是伪静态规则代码,需要iisrewrite api插件。

# phpwind – Discuz! 规则

RewriteRule ^(.*)/read-htm-tid-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/read\.php\?tid-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/thread-htm-fid-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2
RewriteRule ^(.*)/thread-htm-fid-([0-9]+)-type-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
RewriteRule ^(.*)/thread-htm-fid-([0-9]+)-search-digest\.html$ $1/forumdisplay\.php\?fid=$2&filter=digest
RewriteRule ^(.*)/profile-htm-action-show-(username|uid)-(.*)\.html$ $1/space\.php\?action=viewpro&$2=$3
RewriteRule ^(.*)/thread-htm-fid-([0-9]+)([a-z\-]+)([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$4
RewriteRule ^(.*)/read-htm-tid-([0-9]+)-page-([0-9]+)-fpage-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3
RewriteRule ^(.*)/read\.php\?tid=([0-9]+)$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)$ $1/forumdisplay\.php\?fid=$2
RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)&type=([0-9]+)$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)&search=digest$ $1/forumdisplay\.php\?fid=$2&filter=digest
RewriteRule ^(.*)/simple/index\.php\?(t|f)([0-9]+\.html)$ $1/archiver/?$2id-$3
RewriteRule ^(.*)/profile\.php\?action=show&(username|uid)=(.*)$ $1/space\.php\?action=viewpro&$2=$3
RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)([a-zA-Z=&]+)([0-9]+)$ $1/forumdisplay\.php\?fid=$2&page=$4
RewriteRule ^(.*)/read\.php\?tid=([0-9]+)&page=([0-9]+)&fpage=([0-9]+)$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3

从动网到DZ如何保住流量的站长进入

# Discuz4.10 Rewrite规则

 

RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro\.php\?$2=$3

#以下是我的论坛rewrite样本:

#A:动网rewrite到Discuz
RewriteRule ^(.*)/index\.asp\?[bB]oard[iI][dD]=([0-9]+)$ $1/index\.php\?gid=$2
RewriteRule ^(.*)/dispbbs\.asp\?board[iI][dD]=([0-9]+)&[iI][dD]=([0-9]+)$ $1/viewthread\.php\?tid=$3
RewriteRule ^(.*)/index\.asp\?[bB]oard[iI][dD]=([0-9]+)&[pP]age=([0-9]+)$ $1/forumdisplay\.php\?fid=$2&page=$3
RewriteRule ^(.*)/dispbbs\.asp\?board[iI][dD]=([0-9]+)&[iI][dD]=([0-9]+)&page=([0-9]+)$ $1/viewthread\.php\?tid=$3&page=$4

论坛改域名,如何保住流量,httpd.ini的规则怎么加

IIS的环境,DZ6.0,域名由www.xxx.cn/bbs改为bbs.xxx.cn,搜索引擎收录的都费了,怎末修改httpd.ini文件,添加规则,使www.xxx.cn/bbs/*****的地址全都转到bbs.xxx.cn?

 

1.在原先网站(www.xxx.cn)目录下新建bbs目录
2.* 打开internet信息服务管理器,在欲重定向的目录(BBS)上按右键
    * 选中“重定向到URL”
    * 在对话框中输入目标页面的地址HTTP://BBS.xxxx.cn$S$Q
    * 切记,记得选中“资源的永久重定向”
    * 还有需要说明的是必须勾上上面输入准确的URL(sunyabc老兄的就不需要,很诡异的事情啊)
    * 当然,最后要点击“应用”

动网转DZ不使用rewrite保住SEO流量的最简单办法

 动网论坛中,只是把帖子的dispbbs.asp页面的ID参数变一下,有办法获取asp也面url传入的参数吗,于是查来好久资料,找到一个<%=request("ID")%>说可以获取参数值。于是又是研究了半天,最后找到一种使用HTML中Meta标签方法<Meta http-equiv="Refresh"  Content="0; Url=)%>">,运气好成功了  

修改dispbbs.asp源文件为

代码:

<Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/viewthread.php?tid=<%=request("ID")%>">

修改printpage.asp源文件修改为

代码:

<Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/viewthread.php?tid=<%=request("ID")%>">

对论坛的版块分类的重定向小弟就无能为力,只有定向到首页算了

代码:

<Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/">

根据的我只把dispbbs.asp 内容改成这样,直接转向会影响seo的,搜索引擎会当你作弊

代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

你访问的页面已经更改地址,请点击下面的新地址进入
">viewthread.php?tid=<%=request("ID")%>

 
 
PW论坛转换成DZ论坛后的原静态URL失效问题完美解决方案
 
很多的朋友的PW论坛伪静态化之后,论坛地址全部变成:
read-htm-??.html
thread-htm-???.ht
ml
转换到DZ论坛后势必会流失大量的搜索引擎过来的URL,如何让它继续有效呢?

 

1、在http.conf有关虚拟主机的  <IfModule mod_rewrite.c></IfModule>之间加上以下代码
 

代码:
RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3
RewriteRule ^/thread-htm-fid-([0-9]+)(.*)\.html$ /forumdisplay.php?fid=$1 [L,R]
RewriteRule ^/thread.php(.*)$ /forumdisplay.php$1 [L,R]
RewriteRule ^/read-htm-tid-([0-9]+)(.*)\.html$ /viewthread.php?tid=$1 [L,R]
RewriteRule ^/read.php(.*)$ /viewthread.php$1 [L,R]
RewriteRule ^/home.php$ /index.php [L,R]
RewriteRule ^/simple/ /archiver/ [R]
RewriteRule ^/notice.php /announcement.php [R]
RewriteRule ^/notice-htm-(.*)\.html /announcement.php [R]
RewriteRule ^/job-htm-(.*)\.html /index.php [R]
RewriteRule ^/job.php /index.php [R]
RewriteRule ^/bt.php /forumdisplay.php?fid=99 [R]
RewriteRule ^/bt-htm-(.*)\.html /forumdisplay.php?fid=99 [R]

2、在archiver/index.php里找到
 

代码:
if($tid) {
        $action = 'thread';
        $forward = 'viewthread.php?tid='.$tid;
} elseif($fid) {
        $action = 'forum';
        $forward = 'forumdisplay.php?fid='.$fid;
} else {
        $action = 'index';
        $forward = 'index.php';
}

在它之前加上
 

代码:
$R_URL=substr(($cutchar=strrchr($REQUEST_URI,'?')) ? substr($cutchar,1) :'',0,-5);

 

if($R_URL){
        $R_URL_A=explode('_',$R_URL);
        $prog=substr($R_URL_A[0],0,1);
        $id=(int)substr($R_URL_A[0],1);
        $page=(int)$R_URL_A[1];
}else{
        $prog='';
}

switch($prog){
        case 'f':
                $fid =& $id;break;
//                include_once(R_P.'simple/mod_thread.php');
        case 't':
                $tid =& $id;break;
//                include_once(R_P.'simple/mod_read.php');
        default:
//                include_once(R_P.'simple/mod_index.php');
}

不过这时一定要启用Achiver静态化,不然Achiver就没用了;

 

转换到Discuz!后,保住流量,使用永久重定向来进行页面的跳转(动网为例)

(1) asp 版: 需要同时支持 asp 和 php 的支持. 将压缩包中的文件解压出来放到论坛的根目录即可.

 

 

(2)php 版: 需要做如下操作:先在脚本处添加.asp后缀用phpisapi.dll来解析,和添加.php后缀文件一样的方法.

 

其他论坛,同理修改

 
phpwind论坛转为discuz!论坛后,对于以前phpwind论坛的搜索引擎收录处理上,这是相当多站长担心的问题。因此,更换网站域名、转换网站程序,能够提前处理好这方面情况,对于平衡转换是很有帮助的。讲述中以动网转discuz!论坛为例,讲了一些利用iisrewrite重写api来实现的转换,也讲了phpwind转换discuz方面的转换伪静态规则代码,简单提示了一下永久重定向设置等,代码多引用自discuz论坛,各个网站针对自己特殊情况可做些修改,如有对规则不熟悉的地方,可以搜索网络了解转换规则。

 

永久重定向dvjumpdz之asp版.zip永久重定向dvjumpdz之php版.zip

发表评论: