好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 網站建設 > 建站知識 > dedecms偽靜態的實現方法

dedecms偽靜態的實現方法

POST TIME:2019-03-20 14:27

操作如下:

1、后臺-系統參數-核心設置-是否使用偽靜態:選擇“是”;
注:你的網站空間是否支持偽靜態,你可以與空間的IDC商聯系一 下,如果是自己的服務器,那就更好辦了,自己動手,豐衣足食。一般來說,空間都是支持偽靜態的。Apache服務器偽靜態相對簡單,直接 在.htaccess文件中加入相應偽靜態規則即可;而IIS服務器偽靜態的實現,則需要加載Rewrite組件,然后配置httpd.ini文件。
2、如果你的網站已經存在生成的靜態欄目或文章HTML,那么只需在后臺-系統-SQL命令行工具中執行如下語句:
DEDECMS 在 godaddy 空間的偽靜態設置方法詳解

如何設置DedeCMS問答模塊rewrite偽靜態教程

dedecms5.7 問答模塊實現偽靜態的方法

dedecms織夢全站偽靜態規則
將所有文檔設置為“僅動態瀏覽”:

update dede_archives set ismake=-1

將所有欄目設置為“使用動態頁”:

update dede_arctype set isdefault=-1

3、列表頁、文章頁偽靜態修改

打開/include/helpers/channelunit.helper.php。
(1)查找:
//動態文章
if($cfg_rewrite == ‘Y’)
{
return $GLOBALS["cfg_plus_dir"].”/view-”.$aid.’-1.html’;
}
替換為
//動態文章
if($cfg_rewrite == ‘Y’)
{
return “/DedeCMS/DedeCMS5.7-”.$aid.’-1.html’;
}
意思是:將默認的/plus/view-1-1.html文章鏈接格式改為/DedeCMS/DedeCMS5.7-1-1.html。
(2) 查找:
//動態
$reurl = $GLOBALS['cfg_phpurl'].”/list.php?tid=”.$typeid;
替換為
//動態
$reurl = “/category/list-”.$typeid.”.html”;
意思是:將默認的頻道或是列表頁URL/plus//list.php?tid=1變更為/dedecms/list-1.html形式。

4、列表分頁偽靜態修改

打開/include/arc.listview.class.php

查找:
$plist = str_replace(‘.php?tid=’, ‘-’, $plist);
替換為
$plist = str_replace(‘plus/list.php?tid=’, ‘DedeCMS/DedeCMS5.7-’, $plist);
將默認的plus/list.php?tid=替換成RMB/list-;
意思是:將默認的列表分頁鏈接格式plus/list.php?tid=x$x$xl修改為DedeCMS/DedeCMS5.7-x-x-x.html。
5、文章分頁偽靜態
打開/include/arc.archives.class.php,找到獲取動態的分頁列表GetPagebreakDM()函數末尾處:
查找:
$PageList = str_replace(“plus/view.php?tid=”,”DedeCMS/DedeCMS5.7-”,$PageList);
替換為
$plist = str_replace(‘plus/view.php?tid=’, ’DedeCMS/DedeCMS5.7-’, $plist);

將默認的plus/view.php?tid=替換成RMB/huilv-;
意思是:將默認的文章分頁鏈接格式plus/view.php?tid=x$x$xl修改為DedeCMS/DedeCMS5.7-x-x-x.html

6、TAG標簽偽靜態
DedeCms默認的TAG標簽URL,形如/tags.php?/dedecms模板 /,是不是覺得有個問號不怎么爽,我們改成/tags/dedecms模板 /,是不是好看多了。
下面我們來改一下,打開/include/taglib/tag.lib.php:
查找:
$row['link'] = $cfg_cmsurl.”/tags.php?/”.urlencode($row['keyword']).”/”;
替換為
$row['link'] = $cfg_cmsurl.”/tags/”.urlencode($row['keyword']).”/”;
這樣就修改好了,上傳你到你的網站,切記:要記得將原網站備份哦!!
7、httpd.ini偽靜態規則:

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/RMB/list-([0-9]+).html $1/plus/list.php?tid=$2 [I]
RewriteRule ^(.*)/RMB/list-([0-9]+)-([0-9]+)-([0-9]+).html $1/plus/list.php?tid=$2&TotalResult=$3&PageNo=$4 [I]
RewriteRule ^(.*)/RMB/huilv-([0-9]+)-([0-9]+).html $1/plus/view.php?arcID=$2&pageno=$3 [I]
RewriteRule ^(.*)/(.*)_(.*)_([0-9]+).html $1/huilv/?from=$2&to=$3&num=$4 [I]
RewriteRule ^(.*)/tags.html $1/tags.php [I]
RewriteRule ^(.*)/tags/(.*)(?:(?.*))* $1/tags.php?/$2 [I]
RewriteRule ^(.*)/tags/(.*)/(?:(?.*))* $1/tags.php?/$2/ [I]
RewriteRule ^(.*)/tags/(.*)/([0-9])(?:(?.*))* $1/tags.php?/$2/$3 [I]
RewriteRule ^(.*)/tags/(.*)/([0-9])/(?:(?.*))* $1/tags.php?/$2/$3/ [I]

將上面代碼保存為:httpd.ini 上傳到網站的根目錄



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266