Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑问] phpwind6转换为discuz6后的搜索引擎收录问题

[复制链接]
besthome 发表于 2007-12-25 13:18:42 | 显示全部楼层 |阅读模式
phpwind论坛,运行已经两年,主题贴七万余,百度收录10万余,gg收录一万多,ip5000左右,pv 10的左右;一直启用pw的伪静态。

现打算转换为discuz6,并结合SupeSite5.5.5/X-Space3.0.5建立门户网站。

并且也打算discuz6和SS都启用伪静态。

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

404转向?rewrite静态规则转换?

有没有一种静态规则,可以使phpwind论坛的read-htm-tid-547653.html形式,转换为thread-547653-1-1.html,个人感觉应该有这种规则,只是苦于不会写这种规则,比较郁闷。

另外,在phpwind论坛转换为discuz论坛方面,还有没有这方面的更好的建议和方法?共享一下,谢谢大家!
回复

使用道具 举报

宙斯2008 发表于 2007-12-25 13:30:24 | 显示全部楼层
http://discuz.net/thread-434298-1-1.html

2楼Q7

[ 本帖最后由 宙斯2008 于 2007-12-25 13:33 编辑 ]
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:04:04 | 显示全部楼层
那个动网转dz的例子,对我很有启发,谢谢楼上的。转换程序,我应该可以顺利搞定,只是这个静态规则的编写,不知道论坛是否有提供的?
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:07:49 | 显示全部楼层

phpwind=>Discuz! 保持搜索引擎带来的流量之rewrite 规则

以IIS为例
  1. # phpwind - Discuz! 规则

  2. RewriteRule ^(.*)/read-htm-tid-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2
  3. RewriteRule ^(.*)/read\.php\?tid-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2
  4. RewriteRule ^(.*)/thread-htm-fid-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2
  5. RewriteRule ^(.*)/thread-htm-fid-([0-9]+)-type-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
  6. RewriteRule ^(.*)/thread-htm-fid-([0-9]+)-search-digest\.html$ $1/forumdisplay\.php\?fid=$2&filter=digest
  7. RewriteRule ^(.*)/profile-htm-action-show-(username|uid)-(.*)\.html$ $1/space\.php\?action=viewpro&$2=$3
  8. RewriteRule ^(.*)/thread-htm-fid-([0-9]+)([a-z\-]+)([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$4
  9. RewriteRule ^(.*)/read-htm-tid-([0-9]+)-page-([0-9]+)-fpage-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3
  10. RewriteRule ^(.*)/read\.php\?tid=([0-9]+)$ $1/viewthread\.php\?tid=$2
  11. RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)$ $1/forumdisplay\.php\?fid=$2
  12. RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)&type=([0-9]+)$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
  13. RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)&search=digest$ $1/forumdisplay\.php\?fid=$2&filter=digest
  14. RewriteRule ^(.*)/simple/index\.php\?(t|f)([0-9]+\.html)$ $1/archiver/?$2id-$3
  15. RewriteRule ^(.*)/profile\.php\?action=show&(username|uid)=(.*)$ $1/space\.php\?action=viewpro&$2=$3
  16. RewriteRule ^(.*)/thread\.php\?fid=([0-9]+)([a-zA-Z=&]+)([0-9]+)$ $1/forumdisplay\.php\?fid=$2&page=$4
  17. RewriteRule ^(.*)/read\.php\?tid=([0-9]+)&page=([0-9]+)&fpage=([0-9]+)$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3
复制代码
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:09:02 | 显示全部楼层

从动网到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
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:10:55 | 显示全部楼层

论坛改域名,如何保住流量,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老兄的就不需要,很诡异的事情啊)
    * 当然,最后要点击“应用”
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:15:37 | 显示全部楼层

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

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

修改dispbbs.asp源文件为
  1. <Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/viewthread.php?tid=<%=request("ID")%>">
复制代码
修改printpage.asp源文件修改为
  1. <Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/viewthread.php?tid=<%=request("ID")%>">
复制代码
对论坛的版块分类的重定向小弟就无能为力,只有定向到首页算了
  1. <Meta http-equiv="Refresh" Content="0; Url=论坛所在目录/">
复制代码
根据的我只把dispbbs.asp 内容改成这样,直接转向会影响seo的,搜索引擎会当你作弊
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

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

[ 本帖最后由 besthome 于 2007-12-25 14:17 编辑 ]
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:21:17 | 显示全部楼层

PW论坛转换成DZ论坛后的原静态URL失效问题完美解决方案

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

1、在http.conf有关虚拟主机的  <IfModule mod_rewrite.c></IfModule>之间加上以下代码
  1. RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index.php?$2
  2. RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
  3. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
  4. RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3
  5. RewriteRule ^/thread-htm-fid-([0-9]+)(.*)\.html$ /forumdisplay.php?fid=$1 [L,R]
  6. RewriteRule ^/thread.php(.*)$ /forumdisplay.php$1 [L,R]
  7. RewriteRule ^/read-htm-tid-([0-9]+)(.*)\.html$ /viewthread.php?tid=$1 [L,R]
  8. RewriteRule ^/read.php(.*)$ /viewthread.php$1 [L,R]
  9. RewriteRule ^/home.php$ /index.php [L,R]
  10. RewriteRule ^/simple/ /archiver/ [R]
  11. RewriteRule ^/notice.php /announcement.php [R]
  12. RewriteRule ^/notice-htm-(.*)\.html /announcement.php [R]
  13. RewriteRule ^/job-htm-(.*)\.html /index.php [R]
  14. RewriteRule ^/job.php /index.php [R]
  15. RewriteRule ^/bt.php /forumdisplay.php?fid=99 [R]
  16. RewriteRule ^/bt-htm-(.*)\.html /forumdisplay.php?fid=99 [R]
复制代码
2、在archiver/index.php
里找到
  1. if($tid) {
  2.         $action = 'thread';
  3.         $forward = 'viewthread.php?tid='.$tid;
  4. } elseif($fid) {
  5.         $action = 'forum';
  6.         $forward = 'forumdisplay.php?fid='.$fid;
  7. } else {
  8.         $action = 'index';
  9.         $forward = 'index.php';
  10. }
复制代码
在它之前加上
  1. $R_URL=substr(($cutchar=strrchr($REQUEST_URI,'?')) ? substr($cutchar,1) :'',0,-5);

  2. if($R_URL){
  3.         $R_URL_A=explode('_',$R_URL);
  4.         $prog=substr($R_URL_A[0],0,1);
  5.         $id=(int)substr($R_URL_A[0],1);
  6.         $page=(int)$R_URL_A[1];
  7. }else{
  8.         $prog='';
  9. }

  10. switch($prog){
  11.         case 'f':
  12.                 $fid =& $id;break;
  13. //                include_once(R_P.'simple/mod_thread.php');
  14.         case 't':
  15.                 $tid =& $id;break;
  16. //                include_once(R_P.'simple/mod_read.php');
  17.         default:
  18. //                include_once(R_P.'simple/mod_index.php');
  19. }
复制代码
不过这时一定要启用Achiver静态化,不然Achiver就没用了
回复

使用道具 举报

 楼主| besthome 发表于 2007-12-25 14:26:15 | 显示全部楼层

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

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

永久重定向dvjumpdz之asp版.zip (1.57 KB)  

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

永久重定向dvjumpdz之php版.zip (1.59 KB)

其他论坛,同理修改。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-14 09:36 , Processed in 0.117790 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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