2013-09-27 14:11:01
来 源
IT技术网
Nginx
本文介绍飞飞CMS在Nginx服务器下的伪静态规则配置,希望对于初学Nginx服务器相关的朋友有帮助,更多Nginx安装、配置、报错处理等资源请本站内搜索。。
官方出品模板 

nginx规则如下,仅供参考,请灵活使用后台的自定义伪静态的附加参数,如果有使用附加参数就一定要在规则里面做对应的rewrite

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;           

                }

[打印] [关闭]

声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。