JTBC(CMS)內(nèi)容管理系統(tǒng)PHP版本的偽靜態(tài)(開(kāi)源與免費(fèi)的網(wǎng)站內(nèi)容管理系統(tǒng))
[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!
最近哥們要做一個(gè)幫助系統(tǒng),看上了JTBC(CMS)內(nèi)容管理系統(tǒng),奈何不想用生成,對(duì)SEO或者美觀度,還是顯示為靜態(tài)比較好,
那就是偽靜態(tài),他們家的東西也是真全乎,啥版本的都有? PHP? NET? JSP ASP 不得了,高端大氣上檔次;官方下載地址https://www.jtbc.cn/download/
3.0.1.6版本設(shè)置偽靜態(tài)及htaccess代碼
/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:
新建個(gè)記事本,內(nèi)容如下,重命名為 .htaccess ,放到網(wǎng)站根目錄下
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;
==============================================================================
以下是一個(gè)比較完整的的偽靜態(tài),也僅供參考
RewriteEngine on
RewriteRule ^news/index.html$ news/index.php
RewriteRule ^news/detail-(.[0-9]*).html$ news/index.php?type=detail&id=$1
RewriteRule ^news/list-(.[0-9]*)-(.[0-9]*).html$ news/index.php?type=list&classid=$1&offset=$2
RewriteRule ^case/index.html$ case/index.php
RewriteRule ^case/detail-(.[0-9]*).html$ case/index.php?type=detail&id=$1
RewriteRule ^case/list-(.[0-9]*)-(.[0-9]*).html$ case/index.php?type=list&classid=$1&offset=$2
RewriteRule ^index.html$ index.php
RewriteRule ^aboutus.html$ aboutus.php
RewriteRule ^web.html$ web.php
RewriteRule ^contact.html$ contact.php
RewriteRule ^net/detail-(.[0-9]*).html$ net/index.php?type=detail&id=$1
RewriteRule ^net/detail-(.[0-9]*)-(.[0-9]*).html$ net/index.php?type=list&classid=$1&offset=$2ErrorDocument 404 /404.html
RewriteEngine on
RewriteCond %{http_host} ^yihunweb.com [NC]
RewriteRule ^(.*)$ http://www.yihunweb.com/$1 [R=301,L]
news是文章模塊,case產(chǎn)品模塊,net是aboutus模塊,下面4句是404和301重定向。
然后記得修改配置管理模塊的鏈接模式然后刪除緩存,基本上是沒(méi)有問(wèn)題的
===================================================================
還搜索到一名網(wǎng)友給出的偽靜態(tài)方式,僅供參考
1.把ISAPI_Rewrite.dll和httpd.ini 傳到空間根目錄任意文件夾
2.在空間控制面板里面設(shè)置ISAPI篩選器.把ISAPI_Rewrite.dll添加進(jìn)去(基本空間都有這功能吧)
3.到j(luò)tbc 要偽靜態(tài)模塊目錄下config.jtbc里面.
? ? <item>
? ? ? <name><![CDATA[nurltype]]></name>
? ? ? <chinese><![CDATA[0]]></chinese>
? ? </item>
改成
? ? <item>
? ? ? <name><![CDATA[nurltype]]></name>
? ? ? <chinese><![CDATA[3]]></chinese>
? ? </item>
4.完成
下面是ISAPI_Rewrite偽靜態(tài)規(guī)格 :
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
#表示將目錄下Default.aspx映射為Default.htm
RewriteRule /articles/Default.htm /articles/Default\.aspx [N,I]
#文章內(nèi)容連接
RewriteRule /articles/detail-(\d+)\.htm /articles/default\.aspx\?type=detail&id=$1 [N,I]
#文章內(nèi)容翻頁(yè)翻頁(yè)連接
RewriteRule /articles/detail-(\d+)-(\d+)\.htm /articles/default\.aspx\?type=detail&id=$1&ctpage=$2 [N,I]
#二級(jí)菜單連接
RewriteRule /articles/list-(\d+)-(\d+)\.htm /articles/default\.aspx\?type=list&class=$1&page=$2 [N,I]
#數(shù)字翻頁(yè)連接
RewriteRule /articles/list--(\d+)-(\d+)\.htm /articles/default\.aspx\?type=list&class=$1&page=$2 [N,I]
上面是把a(bǔ)rticles偽靜態(tài) 其他要偽靜態(tài)照葫蘆畫(huà)瓢
其他版本 方法一樣 (asp.php.net.jsp)
===================================================================
問(wèn)題未解決?付費(fèi)解決問(wèn)題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信
所寫(xiě)所說(shuō),是心之所感,思之所悟,行之所得;文當(dāng)無(wú)敷衍,落筆求簡(jiǎn)潔。 以所舍,求所獲;有所依,方所成!