phpcms伪静态不生成文件
文章描述:
phpcms如何设置伪静态访问而且又不生成静态文件的方法?
URL规则
后台 → 扩展 → URL规则管理
ID | 所属模块 | 名称 | 是否生成静态? | URL示例 | URL规则 |
---|---|---|---|---|---|
31 | content | category | × | static/index.html | {$catdir}/index.html|{$catdir}/index_{$page}.html |
32 | content | show | × | static/show.html | {$categorydir}/{$id}.html|{$categorydir}/{$id}_{$page}.html |
33 | content | show | × | static/cat/index.html | {$categorydir}{$catdir}/{$id}.html|{$categorydir}{$catdir}/{$id}_{$page}.html |
34 | content | category | × | category – about | {$catdir}/index.html|{$catdir}/index_{$page}.html |
35 | content | category | √ | list-category.html | {$catdir}/index.html|{$catdir}/index_{$page}.html |
ID31 一级栏目页
ID32 一级内容页
ID33 二级内容页
ID34 一级栏目页
ID35 一级栏目页URL规则 – 生成文件,用于一级栏目访问去掉index.html
栏目
一级栏目
二级栏目
单网页
一级单页
二级单页
二级栏目
例如文章栏目类型的
nginx伪静态
location / {
index index.php index.html index.htm index.php;
#autoindex on;
#贷款产品 目录 /daikuan/
#rewrite ^/daikuan/ /index.php?m=content&c=index&a=lists&catid=1 last;
rewrite ^/daikuan/index.html /index.php?m=content&c=index&a=lists&catid=1 last;
rewrite ^/daikuan/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=1&page=$1 last;
rewrite ^/daikuan/xydk/index.html /index.php?m=content&c=index&a=lists&catid=11 last; #信用贷款
rewrite ^/daikuan/xydk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=11&page=$1 last;
rewrite ^/daikuan/xydk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=11&id=$1 last;
rewrite ^/daikuan/fcdk/index.html /index.php?m=content&c=index&a=lists&catid=12 last; #房产贷款
rewrite ^/daikuan/fcdk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=12&page=$1 last;
rewrite ^/daikuan/fcdk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=12&id=$1 last;
rewrite ^/daikuan/qcdk/index.html /index.php?m=content&c=index&a=lists&catid=13 last; #汽车贷款
rewrite ^/daikuan/qcdk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=13&page=$1 last;
rewrite ^/daikuan/qcdk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=13&id=$1 last;
rewrite ^/daikuan/qydk/index.html /index.php?m=content&c=index&a=lists&catid=14 last; #企业贷款
rewrite ^/daikuan/qydk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=14&page=$1 last;
rewrite ^/daikuan/qydk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=14&id=$1 last;
# guwen
rewrite ^/gw/index.html /index.php?m=content&c=index&a=lists&catid=2 last;
rewrite ^/gw/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=2&page=$1 last;
#news
rewrite ^/dkzx/index.html /index.php?m=content&c=index&a=lists&catid=3 last;
rewrite ^/dkzx/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=3&page=$1 last;
rewrite ^/dkzx/grdk/index.html /index.php?m=content&c=index&a=lists&catid=15 last; #个人贷款
rewrite ^/dkzx/grdk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=15&page=$1 last;
rewrite ^/dkzx/grdk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=15&id=$1 last;
rewrite ^/dkzx/qydk/index.html /index.php?m=content&c=index&a=lists&catid=16 last; #企业贷款
rewrite ^/dkzx/qydk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=16&page=$1 last;
rewrite ^/dkzx/qydk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=16&id=$1 last;
rewrite ^/dkzx/xydk/index.html /index.php?m=content&c=index&a=lists&catid=17 last; #信用贷款
rewrite ^/dkzx/xydk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=17&page=$1 last;
rewrite ^/dkzx/xydk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=17&id=$1 last;
rewrite ^/dkzx/dydk/index.html /index.php?m=content&c=index&a=lists&catid=18 last; #抵押贷款
rewrite ^/dkzx/dydk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=18&page=$1 last;
rewrite ^/dkzx/dydk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=18&id=$1 last;
rewrite ^/dkzx/zxdk/index.html /index.php?m=content&c=index&a=lists&catid=19 last; #装修贷款
rewrite ^/dkzx/zxdk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=19&page=$1 last;
rewrite ^/dkzx/zxdk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=19&id=$1 last;
rewrite ^/dkzx/gcdk/index.html /index.php?m=content&c=index&a=lists&catid=20 last; #购车贷款
rewrite ^/dkzx/gcdk/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=20&page=$1 last;
rewrite ^/dkzx/gcdk/([0-9]+).html /index.php?m=content&c=index&a=show&catid=20&id=$1 last;
rewrite ^/dkzx/dkbz/index.html /index.php?m=content&c=index&a=lists&catid=21 last; #贷款帮助
rewrite ^/dkzx/dkbz/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=21&page=$1 last;
rewrite ^/dkzx/dkbz/([0-9]+).html /index.php?m=content&c=index&a=show&catid=21&id=$1 last;
rewrite ^/dkzx/cjwt/index.html /index.php?m=content&c=index&a=lists&catid=22 last; #常见问题
rewrite ^/dkzx/cjwt/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=22&page=$1 last;
rewrite ^/dkzx/cjwt/([0-9]+).html /index.php?m=content&c=index&a=show&catid=22&id=$1 last;
#shenqing
rewrite ^/shenqing.html /index.php?m=content&c=index&a=lists&catid=4 last; #立即申请
#about
rewrite ^/about/news/index.html /index.php?m=content&c=index&a=lists&catid=8 last; #公司新闻
rewrite ^/about/news/index_([0-9]+).html /index.php?m=content&c=index&a=lists&catid=8&page=$1 last;
rewrite ^/about/news/([0-9]+).html /index.php?m=content&c=index&a=show&catid=8&id=$1 last;
rewrite ^/about /index.php?m=content&c=index&a=lists&catid=6 last; #关于我们
rewrite ^/company /index.php?m=content&c=index&a=lists&catid=6 last; #公司简介
rewrite ^/culture /index.php?m=content&c=index&a=lists&catid=7 last; #企业文化
rewrite ^/clause /index.php?m=content&c=index&a=lists&catid=9 last; #服务条款
rewrite ^/contact /index.php?m=content&c=index&a=lists&catid=10 last; #联系我们
}
发布时间:2022/10/17
发表评论