阅读:1671回复:5

Nginx伪静态规则专题不能分页

楼主#
更多 发布于:2020-11-22 19:07
请教大佬们Nginx伪静态规则专题不能分页问题解决办法
1楼#
发布于:2020-11-23 00:05
试试这个,实测没问题。
路径名称请对照修改:
location / {
 rewrite ^/frim/index(.+?)\.html$ /list/index.php?$1 last;
 rewrite ^/movie/index(.+?)\.html$ /detail/index.php?$1 last;
 rewrite ^/play/([0-9]+)-([0-9]+)-([0-9]+)\.html$ /video/index.php?$1-$2-$3 last;
 rewrite ^/topic/index(.+?)\.html$ /topic/index.php?$1 last;
 rewrite ^/topic/index\.html$ /topic/index.php?$1 last;
 rewrite ^/topiclist/(.+?).html$ /topiclist/index.php?$1 last;
 rewrite ^/index\.html$ index.php permanent;
 rewrite ^/news/index\.html$ /news/index.php?$1 last;
 rewrite ^/html/part/index(.+?)\.html$ /articlelist/index.php?$1 last;
 rewrite ^/html/article/index(.+?)\.html$ /article/index.php?$1 last;
}
2楼#
发布于:2020-11-23 01:34
非常感谢大大,万能调用模块怎么加伪静态呢,比如有hot.php?
3楼#
发布于:2020-11-23 15:01
rewrite ^/xxx\.html$ xxx.php permanent;
4楼#
发布于:2020-12-04 21:40
不行,测试第二页开始仍然是显示第一页的内容,虽然没有提示分页错误
5楼#
发布于:2021-10-30 03:33
这个问题目前还存在,不知道咋弄
游客

返回顶部