今天研究了下PW系统转会到DZ 收录的问题
大家都知道转换以后收录的都打不开了,怎么样才能保留住原来的收录呢利用IIS规则这个比较简单,提供下代码# phpwind - Discuz! 规则
RewriteRule ^(.*)/read-htm-tid-(+)\.html$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/read\.php\?tid-(+)\.html$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/thread-htm-fid-(+)\.html$ $1/forumdisplay\.php\?fid=$2
RewriteRule ^(.*)/thread-htm-fid-(+)-type-(+)\.html$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
RewriteRule ^(.*)/thread-htm-fid-(+)-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-(+)(+)(+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$4
RewriteRule ^(.*)/read-htm-tid-(+)-page-(+)-fpage-(+)\.html$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3
RewriteRule ^(.*)/read\.php\?tid=(+)$ $1/viewthread\.php\?tid=$2
RewriteRule ^(.*)/thread\.php\?fid=(+)$ $1/forumdisplay\.php\?fid=$2
RewriteRule ^(.*)/thread\.php\?fid=(+)&type=(+)$ $1/forumdisplay\.php\?fid=$2&filter=type&typeid=$3
RewriteRule ^(.*)/thread\.php\?fid=(+)&search=digest$ $1/forumdisplay\.php\?fid=$2&filter=digest
RewriteRule ^(.*)/simple/index\.php\?(t|f)(+\.html)$ $1/archiver/?$2id-$3
RewriteRule ^(.*)/profile\.php\?action=show&(username|uid)=(.*)$ $1/space\.php\?action=viewpro&$2=$3
RewriteRule ^(.*)/thread\.php\?fid=(+)(+)(+)$ $1/forumdisplay\.php\?fid=$2&page=$4
RewriteRule ^(.*)/read\.php\?tid=(+)&page=(+)&fpage=(+)$ $1/viewthread\.php\?tid=$2&extra=page%3D1&page=$3然后是301的跳转这里我也说明下,如果你做了IIS规则就没有必要做这个了<?
foreach ($_GET as $key=>$value)
{
$tem.=$key.$value;
}
$tid=preg_replace('/[^0-9]/','',$tem);
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.lanyudongli.com/thread-".$tid."-1-1.html");
exit();
?>另存为read.php 放到根目录
页:
[1]