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