久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動:電腦PC端+手機端+微網(wǎng)站+自適應(yīng)網(wǎng)頁多模板選擇-建站388元起價!!!
當(dāng)前位置:主頁 > 網(wǎng)站建設(shè) > 比較全面的dedecms織夢全站偽靜態(tài)規(guī)則,織夢文章

比較全面的dedecms織夢全站偽靜態(tài)規(guī)則,織夢文章

時間:2023-07-21 11:07:21 閱讀: 文章分類: 網(wǎng)站建設(shè) 作者: 織夢編輯員

導(dǎo)讀:織夢文章織夢文章dedecms(織夢)完美實現(xiàn)偽靜態(tài)的方法dedecms(織夢)完美實現(xiàn)偽靜態(tài)的方法測試版本:Dedecms V5.6版本測試平臺:Windows 7測試環(huán)境:織夢首頁模板dede58模板。

織夢首頁模板dede58模板

dedecms(織夢)完美實現(xiàn)偽靜態(tài)的方法

dedecms(織夢)完美實現(xiàn)偽靜態(tài)的方法 測試版本:Dedecms V5.6版本 測試平臺:Windows 7 測試環(huán)境:IIS 7.5 成功。其他條件下大同小異。 需要的條件: 1、服務(wù)器必須支持URL重寫。 2、后臺開啟偽靜態(tài)。 3、欄目設(shè)置使用動態(tài)。 4、添加文檔時選擇使用動態(tài)dede網(wǎng)站模板瀏覽。 5、修改php文件include/channelunit.func.php。 6、修改include/arc.listview.class.php。 7、編寫rewrite規(guī)則。 操作步驟: 1、加載Rewrite模塊(過程略)。 2、dedecms后臺-系統(tǒng)-系統(tǒng)基本參數(shù)-核心設(shè)置-是否使用偽靜態(tài),選“是”。 3、把欄目和文檔設(shè)置成為動態(tài)瀏覽。可以手動,用sql語句更快。 dedecms后臺-SQL命令行工具,執(zhí)行以下語句 將所有文檔設(shè)置為“僅動態(tài)瀏覽”:update dede_archives set ismake=-1 將所有欄目設(shè)置為“使用動態(tài)頁”:update dede_arctype set isdefault=-1 改成1就是靜態(tài)。動態(tài)轉(zhuǎn)換為靜態(tài)后需要重新生成HTML。 添加欄目和文章默認(rèn)為動態(tài)的一勞永逸的方法: 4、修改php文件include/channelunit.func.php 查找 return $GLOBALS["cfg_plus_dir"].”/view-”.$aid.’-1.html’; 修改為 return “/view-”.$aid.’-1.html’; 查找 return $GLOBALS['cfg_phpurl'].”/view.php?aid=$aid”; 修改為 return “/view.php?aid=$aid”; 其實頁可以不修改,就是URL地址會長一點。這個是文章頁的。 查找 $reurl = $GLOBALS['cfg_phpurl'].”/list.php?tid=”.$typeid; 修改為 $reurl = “/list-”.$typeid.”.html”; 這個必須修改,是欄目頁的。 其實不修改也可以,但是URL地址會長一點。這個是文章的。 5、打開include/arc.listview.class.php 找到 $plist = str_replace(‘.php?tid=’, ‘-’, $plist); (大約在第964行) 在其前面面添加一行 $plist = str_replace(‘plus/list’, ‘list’, $plist); 這個是列表頁分頁rewrite的url格式的。 默認(rèn)是http://www.xxx.com/plus/list-1-2-3.html 現(xiàn)在是http://www.xxx.com/list-1-2-3.html 6、 設(shè)置重寫規(guī)則,在httpd.ini里面寫上: [ISAPI_Rewrite] # 緩存3600秒 = 1 小時(hour) CacheClockRate 3600 RepeatLimit 32 #dedecms Rewrite規(guī)則 RewriteRule ^(.*)/index\.html$1/index\.php RewriteRule ^(.*)/list-([0-9]+)\.html$1/plus/list\.php\?tid=$2 RewriteRule^(.*)/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4 RewriteRule^(.*)/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3 7、如果不使用動態(tài)首頁 把rewrite規(guī)則中的 RewriteRule ^(.*)/index\.html $1/index\.php 去掉,或改為 RewriteRule ^(.*)/index\.html $1/index\.html 否則打開http://www.xxx.com/index.html時會陷入死循環(huán)。 說明: 1、 RewriteRule ^view-([0-9]+)-([0-9]+)\.html$/plus/view.php?aid=$1&pageno=$2 此為文章分頁重寫命令。 2、如果view替換成自己設(shè)置的其他詞,則需要把include/arc.archives.class.php文件中的view同時替換掉。 3、重寫后的URL如下: 文章頁:http://www.xxx.com/view-1-1.html 列表頁:http://www.xxx.com/list-1.html 如果需要改成如下格式: 文章頁:http://www.xxx.com/abc/view-1-1.html 列表頁:http://www.xxx.com/abc/list-1.html include/channelunit.func.php中 return $GLOBALS["cfg_plus_dir"].”/view-”.$aid.’-1.html’; 改為 return “/abc/view-”.$aid.’-1.html’; return $GLOBALS['cfg_phpurl'].”/view.php?aid=$aid”; 改為 return “/abc/view.php?aid=$aid”; $reurl = $GLOBALS['cfg_phpurl'].”/list.php?tid=”.$typeid; 改為 $reurl = “/abc/list-”.$typeid.”.html”; 重寫規(guī)則改為: RewriteRule ^(.*)/index\.html $1/index\.php Rewrit手機模板dedeeRule^(.*)/abc/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2 RewriteRule^(.*)/abc/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$1/plus/list\.phpdede后臺模板\?tid=$2&TotalResult=$3&PageNo=$4 RewriteRule^(.*)/abc/view-([0-9]+)-([0-9]+)\.html$1/plus/view\.php\?arcID=$2&pageno=$3

關(guān)鍵詞標(biāo)簽: 靜態(tài) 織夢 全站

聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-07-21 ,文章比較全面的dedecms織夢全站偽靜態(tài)規(guī)則,織夢文章主要講述全站,靜態(tài),織夢網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_33472.html

我的IDC 網(wǎng)站建設(shè)技術(shù)SEOUC.COM
專注網(wǎng)站建設(shè),SEO優(yōu)化,小程序設(shè)計制作搭建開發(fā)定制網(wǎng)站等,數(shù)千家網(wǎng)站定制開發(fā)案例,網(wǎng)站推廣技術(shù)服務(wù)。
  • 5000+合作客服
  • 8年從業(yè)經(jīng)驗
  • 150+覆蓋行業(yè)
  • 最新熱門源碼技術(shù)文章

    主站蜘蛛池模板: 贵南县| 教育| 闽清县| 永嘉县| 开阳县| 长垣县| 子长县| 玉门市| 西盟| 湘乡市| 绍兴县| 沙田区| 丹江口市| 辽阳县| 铜梁县| 星子县| 谢通门县| 揭西县| 南投县| 玉山县| 玉林市| 澜沧| 海城市| 濮阳县| 诸城市| 来宾市| 香河县| 泰来县| 罗平县| 陇南市| 浦江县| 浮山县| 铜陵市| 顺平县| 阿拉善右旗| 衢州市| 葵青区| 安吉县| 台北县| 桂东县| 崇礼县|