dedecms 5.5 偽靜態(tài)設(shè)置方法
發(fā)布時間:2010-03-16 16:07:27 作者:佚名
我要評論

dedecms 5.5版后臺可以開啟偽靜態(tài)功能,但是就只文章頁會被偽靜態(tài),欄目頁的鏈接依然是動態(tài)的,我們首先需要給虛擬主機(jī)添加上偽靜態(tài)規(guī)則,然后再去dedecms的相關(guān)文件中改掉相應(yīng)的函數(shù)。為什么要使用偽靜態(tài)?
首先我們給虛擬主機(jī)加上偽靜態(tài)規(guī)則,Apache和IIS的詳細(xì)設(shè)置如下,虛擬主機(jī)是否支持偽靜態(tài),請咨詢你的虛擬主機(jī)提供商。
如果是Apache的服務(wù)器,就在.htaccess里面寫上
代碼:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index\.html /index\.php
RewriteRule plus/list-([0-9]+)\.html$ /plus/list.php?tid=$1
RewriteRule plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$3
RewriteRule plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
</IfModule>
IIS的服務(wù)器,在httpd.ini里面寫上,前提是要服務(wù)器安裝過ISAPI Rewrite
代碼:
[ISAPI_Rewrite]
# 緩存3600秒 = 1 小時(hour)
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/index\.html $1/index\.php
RewriteRule ^(.*)/plus/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2
RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4
RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3
然后我們修改dedecms的程序,打開include\channelunit.func.php
查找
代碼:
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
替換為
代碼:
$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html";
以上修改適用于dedecms 5.5版,其他版本可能稍微有些區(qū)別。
如果是Apache的服務(wù)器,就在.htaccess里面寫上
代碼:
復(fù)制代碼
代碼如下:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index\.html /index\.php
RewriteRule plus/list-([0-9]+)\.html$ /plus/list.php?tid=$1
RewriteRule plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$3
RewriteRule plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
</IfModule>
IIS的服務(wù)器,在httpd.ini里面寫上,前提是要服務(wù)器安裝過ISAPI Rewrite
代碼:
復(fù)制代碼
代碼如下:[ISAPI_Rewrite]
# 緩存3600秒 = 1 小時(hour)
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/index\.html $1/index\.php
RewriteRule ^(.*)/plus/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2
RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4
RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3
然后我們修改dedecms的程序,打開include\channelunit.func.php
查找
代碼:
復(fù)制代碼
代碼如下:$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
替換為
代碼:
復(fù)制代碼
代碼如下:$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html";
以上修改適用于dedecms 5.5版,其他版本可能稍微有些區(qū)別。
相關(guān)文章
織夢Dedecms設(shè)置偽靜態(tài)詳細(xì)方法
dedecms默認(rèn)是不支持偽靜態(tài),如果要設(shè)置偽靜態(tài)我們需要懂一點(diǎn)程序基礎(chǔ)知識了,下面我來給大家介紹在apache下實(shí)現(xiàn)Dedecms設(shè)置偽靜態(tài)方法,有需要的朋友可參考一下2013-04-21DedeCMS系統(tǒng)TAG標(biāo)簽偽靜態(tài)設(shè)置
DedeCMS的系統(tǒng)TAGS確實(shí)是一個非常好的功能,通過關(guān)鍵詞鏈接可以快速尋找到相關(guān)內(nèi)容,不過很多人希望能夠?qū)AGS靜態(tài)化這樣更加利于SEO,CIT.CN也是對此進(jìn)行了優(yōu)化和調(diào)整,只2012-11-11dedecms tag標(biāo)簽偽靜態(tài)的修改方法
dedecms tag標(biāo)簽偽靜態(tài)的修改方法,需要的朋友可以參考下。2011-08-10- DEDE雖然可以生成靜態(tài)頁面, 也可以重寫成為偽靜態(tài). 在后臺有設(shè)置可以開啟偽靜態(tài). 開啟后還要經(jīng)過一定的設(shè)置才能使用.2011-08-10
dedecms 5.6 完美實(shí)現(xiàn)偽靜態(tài)的方法附打包文件下載
dedecms 5.6 完美實(shí)現(xiàn)偽靜態(tài)的方法附打包文件下載2010-09-14dedecms 5.5 偽靜態(tài)化ReWrite規(guī)則
dedecms 5.5 偽靜態(tài)化 ReWrite設(shè)置技巧,使用dedecms5.5的朋友可以參考下。2010-09-14dedecms5.3偽靜態(tài)及rewrite規(guī)則
因?yàn)榘呈怯没疖囶^采集自動更新 每次采集完還要手工生成一下欄目列表頁 麻煩 所以就想著把欄目頁搞成偽靜態(tài) 這個dede默認(rèn)就支持 !2010-09-14linux和windows主機(jī)實(shí)現(xiàn)dedecms偽靜態(tài)
有些朋友為了節(jié)約空間等原因,喜歡用偽靜態(tài)的,對于流量小,確實(shí)不錯,下面看下具體的方法。2010-07-19dedecms 5.3/5.5全站偽靜態(tài)含SEO重復(fù)記錄優(yōu)化
DEDECMS系統(tǒng)欄目、文章頁面、分頁面?zhèn)戊o態(tài)和域名301重定向詳細(xì)方法2010-06-30DEDECMS 5.1 TAG偽靜態(tài)IIS_rewrite配置方法
有時候需要在dedecms中實(shí)現(xiàn)tag的偽靜態(tài),這種表現(xiàn)方法,更利于seo,所以很多朋友喜歡。2009-06-06