阅读:78回复:1

我想问一下这个伪静态规则需要修改吗?

楼主#
更多 发布于:2026-08-08 09:24
我使用宝塔建站的,我看到压缩包里有一个文件里给出的Nginx伪静态是这样的!

我是直接填进去,还是需要做出哪些路径上的修改?

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;
}
1楼#
发布于:2026-08-14 18:50
默认是这个,后台如果你自己修改了路径名称,则需要对应修改为你自己设置的名称。
游客

返回顶部