VPS侦探论坛

 找回密码
 注册
查看: 5171|回复: 2

请教phpwind转discuz的伪静态规则

[复制链接]
发表于 2011-12-27 10:37:41 | 显示全部楼层 |阅读模式

最近想把PW转向DZ,原来用的伪静态,环境是LNMP ,希望转换后URL地址能保持不变,DZ上也找不到这样转换的伪静态规则,请问军哥能不能写一下呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-12-27 11:06:46 | 显示全部楼层


这里付上Apache Web Server(虚拟主机用户)规则
RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /discuz
RewriteRule ^thread-htm-fid-(\d+)((-type-(\d+))*(-page-(\d+))*)*\.html.*$ forum.php?mod=forumdisplay&fid=$1&filter=type&typeid=$4&page=$6 [R=301]
RewriteCond %{QUERY_STRING} ^fid-(\d+)(-.+-(\d+)\.html)*$
RewriteRule ^thread\.php forum.php?mod=forumdisplay&fid=%1&page=%3 [R=301]
RewriteCond %{QUERY_STRING} ^fid=(\d+)&type=(\d+)$
RewriteRule ^thread\.php forum.php?mod=forumdisplay&fid=%1&filter=type&typeid=%2 [R=301]
RewriteRule ^read-htm-tid-(\w+)(-page-(\d+|e)(-fpage-(\d+))*)*\.html$ forum.php?mod=viewthread&tid=$1&extra=page%3D$5&page=$3 [R=301]
RewriteCond %{QUERY_STRING} ^tid=(\d+)(&page=(\w+)(&fpage=(\d+))*)*$
RewriteRule ^read\.php forum.php?mod=viewthread&tid=%1&extra=page%3D1&page=%3 [R=301]
RewriteCond %{QUERY_STRING} ^tid-(\d+)(-page-(\w+))*\.html$
RewriteRule ^read\.php forum.php?mod=viewthread&tid=%1&page=%3 [R=301]
RewriteCond %{QUERY_STRING} ^tid-(\d+)-ordertype-desc\.html$
RewriteRule ^read\.php forum.php?mod=viewthread&tid=%1&extra=page%3D1&ordertype=1 [R=301]
RewriteCond %{QUERY_STRING} ^f(\d+)\.html$
RewriteRule ^simple/(index\.php)* forum.php?mod=forumdisplay&fid=%1 [R=301]
RewriteCond %{QUERY_STRING} ^t(\d+)(_(\d+))*\.html$
RewriteRule ^simple/(index\.php)* forum.php?mod=viewthread&tid=%1&archiver=1&page=%3 [R=301]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-12-27 11:35:49 | 显示全部楼层

伪静态不会写

这个好像是没法实现,dz的伪静态好像都是在程序上关联很大
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-21 22:48 , Processed in 0.025604 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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