本帖最后由 wuyin731 于 2013-5-16 10:58 编辑
7年的PW8.5已转换成DZ2.5原有的静态网址转换成DZ的规则出现问题
机器环境WIN+IIS+MYSQL
我用的是ISAPI_Rewrite3 静态规则配置文件httpd.conf在C盘安装文件夹下 RewriteEngine On RewriteCompatibility2 On RepeatLimit 200 RewriteBase # unsupported directive: [ISAPI_Rewrite] # [ISAPI_Rewrite] # 本规则支持phpwind 8.5 RewriteRule ^(.*)-htm-(.*)$ $1\.php\?$2 RewriteRule ^(.*)/simple/([a-z0-9_]+.html)$ $1/simple/index.php?$2 RewriteRule ^index\.html$ index.php RewriteRule ^login\.html$ login.php RewriteRule ^register\.html$ register.php RewriteRule ^profile\.html$ profile.php RewriteRule ^(.*?)/([0-9]+)$ $1\.php\?uid=$2 # 本规则支持 dz2.5 RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4 RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5 RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5 RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6 RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5 RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5 RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5 RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?action=$2&value=$3&$5 RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$23&$5 # 本规则支持phpwind8.5原有的静态链接转换成DZ2.5的静态链接 RewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2&$4 RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$5 RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3&$6 RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&$5 RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&do=index&$5 RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&$5 RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3&$5 RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&$5 RewriteRule ^(.*)/thread-htm-fid-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&$4 RewriteRule ^(.*)/thread-htm-fid-([0-9]+)-page-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$5 RewriteRule ^(.*)/read-htm-tid-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&$4 RewriteRule ^(.*)/read-htm-tid-([0-9]+)-page-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&page=$3&$5 RewriteRule ^(.*)/simple/t([0-9]+\.html)$ $1/archiver/index.php?action=tid&value=$2&$4 RewriteRule ^(.*)/simple/f([0-9]+\.html)$ $1/archiver/index.php?action=fid&value=$2&$4 RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$23&$5 最后一个规则出现问题了,是我仿照PW8.7转换成DZ2.5的规则改的(自己一窍不通),这个规则环境好像不是WIN的主机
pw8.5的程序静态可以访问,网址如下
http://localhost/20130511php85/read-htm-tid-8388.html
DZ2.5的程序静态可以访问,网址如下
http://localhost/20130511DZ25/thread-8388-1-1.html
但是如果换成
http://localhost/20130511DZ25/read-htm-tid-8388.html
就不能访问了,估计还是最后改的那个规则有问题,请高手指点,测试成功就可以使用DZ2.5了
|