jtbc php 3.0.1.6版本设置伪静态及htaccess代码

jtbc php 3.0.1.6版本设置伪静态及htaccess代码

日期:2019年5月11日 下午5:04 分类:CMS问题

/common/incfiles/lib/jtbc/route.inc.php
查找$urltype = base::getNum(tpl::take('global.' . $genre . ':config.urltype', 'cfg'), 0);
替换成$urltype = base::getNum(tpl::take('global.' . $genre . ':config.urltype', 'cfg'), 1);

Apache Rewrite:
新建个记事本,内容如下,重命名为 .htaccess ,放到网站根目录下

RewriteRule ^aboutus/detail-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1
RewriteRule ^aboutus/detail-(.[0-9]*)-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1&page=$2

RewriteRule ^news/detail-(.[0-9]*).html$ news/index.php?type=detail&id=$1
RewriteRule ^news/detail-(.[0-9]*)-(.[0-9]*).html$ news/index.php?type=detail&id=$1&page=$2
RewriteRule ^news/list-(.[0-9]*).html$ news/index.php?type=list&category=$1
RewriteRule ^news/list-(.[0-9]*)-(.[0-9]*).html$ news/index.php?type=list&category=$1&page=$2

RewriteRule ^case/detail-(.[0-9]*).html$ case/index.php?type=detail&id=$1
RewriteRule ^case/detail-(.[0-9]*)-(.[0-9]*).html$ case/index.php?type=detail&id=$1&page=$2
RewriteRule ^case/list-(.[0-9]*).html$ case/index.php?type=list&category=$1
RewriteRule ^case/list-(.[0-9]*)-(.[0-9]*).html$ case/index.php?type=list&category=$1&page=$2

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nginx Rewrite:代码如下

rewrite ^/aboutus/detail-(.[0-9]*).html$ /aboutus/index.php?type=detail&id=$1;
rewrite ^/aboutus/detail-(.[0-9]*)-(.[0-9]*).html$ /aboutus/index.php?type=detail&id=$1&page=$2;

rewrite ^/news/detail-(.[0-9]*).html$ /news/index.php?type=detail&id=$1;
rewrite ^/news/detail-(.[0-9]*)-(.[0-9]*).html$ /news/index.php?type=detail&id=$1&page=$2;
rewrite ^/news/list-(.[0-9]*).html$ /news/index.php?type=list&category=$1;
rewrite ^/news/list-(.[0-9]*)-(.[0-9]*).html$ /news/index.php?type=list&category=$1&page=$2;

rewrite ^/case/detail-(.[0-9]*).html$ /case/index.php?type=detail&id=$1;
rewrite ^/case/detail-(.[0-9]*)-(.[0-9]*).html$ /case/index.php?type=detail&id=$1&page=$2;
rewrite ^/case/list-(.[0-9]*).html$ /case/index.php?type=list&category=$1;
rewrite ^/case/list-(.[0-9]*)-(.[0-9]*).html$ /case/index.php?type=list&category=$1&page=$2;


为您推荐


版权声明:

fm0898.com小部分文章引用或者参考了网络上传播的部分开源开放代码,我站采用的这部分代码仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请 联系我们并出示版权证明以便删除 !