[伪静态] 飞飞CMS2.7自定义伪静态功能实例讲解
2.7版将开放自定义伪静态功能,如果不使用系统默认的伪静态规则, 则需要自己编写, 现列出各页面的真实访问地址如下
视频栏目页 index.php?s=/Home-vod-show-id-*-p-*-wd-*-area-*-language-*-actor-*-director-*-year-*-letter-*-order-*.html
视频内容页 index.php?s=/Home-vod-read-id-*.html
视频播放页 index.php?s=/Home-vod-play-id-*-sid-*-pid-*.html
视频搜索页 index.php?s=/Home-vod-search-wd-*-p-*-area-*-language-*-actor-*-director-*-year-*-letter-*-order-*.html
视频tag页 index.php?s=/Home-tag-show-wd-*-p-*.html
新闻栏目页index.php?s=/Home-news-show-id-*-p-*.html
新闻内容页index.php?s=/Home-news-read-id-*.html
新闻搜索页index.php?s=/Home-news-search-wd-*-p-*.html
新闻tag页index.php?s=/Home-tag-shown-wd-*-p-*.html
专题列表页index.php?s=/Home-special-show-p-*.html
专题内容页index.php?s=/Home-special-read-id-*.html
留言本index.php?s=/Home-gb-show-p-*-id-*.html
地图页index.php?s=/Home-map-show-id-*-limit-*.html
自定义模板index.php?s=/Home-my-show-id-*.html
重写例子(后缀名设为html)
视频栏目页规则:/video/$id-$page
视频内容页规则:/video/$id
视频播放页规则:/video/$id-$sid-$pid
视频搜索页规则:/search-$wd-$actor-$page
视频TAG页规则:/tag/$wd-$page
自定义模板规则:/detail/$i
重写规则(apache 其它web服务器请参考)
RewriteRule ^video/([0-9]+).html$ index.php?s=/Home-vod-read-id-$1
RewriteRule ^video/([0-9]+)-([0-9]+).html$ index.php?s=/Home-vod-show-id-$1-p-$2
RewriteRule ^video/([0-9]+)-([0-9]+)-([0-9]+).html$ index.php?s=/Home-vod-play-id-$1-sid-$2-pid-$3
RewriteRule ^search-(.*)-(.*)-([0-9]+).html$ index.php?s=/Home-vod-search-wd-$1-actor-$2-p-$3
RewriteRule ^tag/(.*)-([0-9]+).html$ index.php?s=/Home-tag-show-wd-$1-p-$2
RewriteRule ^detail/(.*).html$ index.php?s=/Home-my-show-id-$1
重写规则(nginx)
<blockquote>location / {
飞飞cms官方论坛-www.feifeicms.vip |
该贴共收到 1 条回复