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

作者 : 影视站长站 发布时间:2020-06-22 人阅读

后台直接开启静态,其他的都默认

location / {
rewrite ^/Tpl/(.*)/Home/(.*)$ / last;
rewrite ^/vod/([0-9]+).html$ /index.php?s=/Home-vod-read-id-$1;
rewrite ^/vod/([0-9]+)-([0-9]+).html$ /index.php?s=/Home-vod-show-id-$1-p-$2;
rewrite ^/vod(\w+)/([0-9]+)-([0-9]+).html$ /index.php?s=/Home-vod-show-order-$1-id-$2-p-$3;
rewrite ^/vod/([0-9]+)-([0-9]+)-([0-9]+).html$ /index.php?s=/Home-vod-play-id-$1-sid-$2-pid-$3;
rewrite ^/search/(.*)-([0-9]+).html$ /index.php?s=/Home-vod-search-wd-$1-p-$2;
rewrite ^/search/(.*).html$ /index.php?s=/Home-vod-search-wd-$1;
rewrite ^/tag/(.*)-([0-9]+).html$ /index.php?s=/Home-tag-show-wd-$1-p-$2;
rewrite ^/detail/(.*).html$ /index.php?s=/Home-my-show-id-$1;
rewrite ^/guestbook/([0-9]+).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 重启生效。
测试成功的哥们记得顶下!