Anonymous 发表于 2022-11-12 03:54:28

discuz门户列表分页伪静态设置教程

DISCUZ门户栏目列表分页URL默认是index.php?page=动态的URL地址,如何修改成伪静态呢?下面保哥教你方法:编辑器打开source/module/portal/portal_list.php找到下面这行代码:$multi =multi($count, $perpage, $page, $cat['caturl'], $cat['maxpages']);替换成如下代码:$multi = str_replace("index.php?page=","page-",multi($count, $perpage, $page, $cat['caturl'], $cat['maxpages']));然后在你的伪静态规则中添加以下规则:RewriteRule ^(.*)/page-([0-9]+)(\?(.*))*$ $1/index.php?page=$2;以上是apache的规则,以下是nginx的规则:rewrite ^([^\.]*)/page-([0-9]+)(\?(.*))*$ $1/index.php?page=$2;
页: [1]
查看完整版本: discuz门户列表分页伪静态设置教程