技术解析

有人会重写url规则吗?nginx的~~discuz程序。
0
2021-07-22 15:53:32
idczone
disucz默认的规则是
http://www.xxx.com/forum-57-1.html
改成http://www.xxx.com/forum/57/1/

http://www.xxx.com/thread-142469-1-1.html
改成http://www.xxx.com/thread/142469/1/1.html

在nginx下,disucz程序,有人会改吗?
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
原始规则。
- to /

discuz的伪静态要更改,好像不仅仅要改.htaccess的规则,也要改某个Php文件的配置。

我的vps当初也是不会整nginx的伪静态, 所以干脆在vps搭建了apache环境, 这样写htaccess就简单些了

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服