【发布时间】:2019-02-12 11:51:05
【问题描述】:
我当前的分页网址如下:
http://localhost:8000/index.php?slug=the-category-name&type=category&page=1
我想要的网址应该是:
https://mywebsite.com/category/the-category-name/page/1/
如果我只想查看没有分页的类别,我会使用此重写规则:
location /category/ {
rewrite ^(.*[^/])$ $1/ permanent;
rewrite ^/category/(.*)/$ /index.php?slug=$1&type=category
last;
}
这就是我获取 URL 的方式:
https://mywebsite.com/category/the-category-name/
为了能够创建分页,我需要在此配置中进行哪些更改(附加到):
【问题讨论】:
标签: nginx pagination