公共账号 发表于 2024-7-29 01:29:22

【飞飞CMS】分享lnmp伪静态规则

后台直接开启伪静态,其他的都默认
location / {
rewrite ^/Tpl/(.*)/Home/(.*)$ / last;
rewrite ^/vod/(+).html$ /index.php?s=/Home-vod-read-id-$1;
rewrite ^/vod/(+)-(+).html$ /index.php?s=/Home-vod-show-id-$1-p-$2;
rewrite ^/vod(w+)/(+)-(+).html$ /index.php?s=/Home-vod-show-order-$1-id-$2-p-$3;
rewrite ^/vod/(+)-(+)-(+).html$ /index.php?s=/Home-vod-play-id-$1-sid-$2-pid-$3;
rewrite ^/search/(.*)-(+).html$ /index.php?s=/Home-vod-search-wd-$1-p-$2;
rewrite ^/search/(.*).html$ /index.php?s=/Home-vod-search-wd-$1;
rewrite ^/tag/(.*)-(+).html$ /index.php?s=/Home-tag-show-wd-$1-p-$2;
rewrite ^/detail/(.*).html$ /index.php?s=/Home-my-show-id-$1;
rewrite ^/guestbook/(+).html$ /index.php?s=/Home-gb-show-p-$1;
rewrite ^/vod-(.*)$ /index.php?s=/Home-vod-$1 last;
rewrite ^/news-(.*)$ /index.php?s=/Home-news-$1 last;
rewrite ^/special-(.*)$ /index.php?s=/Home-special-$1 last;
rewrite ^/tag-(.*)$ /index.php?s=/Home-tag-$1 last;
rewrite ^/gb-(.*)$ /index.php?s=/Home-gb-$1 last;
rewrite ^/cm-(.*)$ /index.php?s=/Home-cm-$1 last;
rewrite ^/map-(.*)$ /index.php?s=/Home-map-$1 last;
rewrite ^/my-(.*)$ /index.php?s=/Home-my-$1 last;         
}lnmp下 把上面的规则保存成 feifei.conf规则文件上传到 /usr/local/nginx/conf/ 下面
记得每个网站配置文件里面加个 include feifei.conf;
最后重启nginx    /etc/init.d/nginx restart 重启生效。
测试成功的哥们记得顶下!
页: [1]
查看完整版本: 【飞飞CMS】分享lnmp伪静态规则