人妻丰满熟妇AV无码片,岛国AV无码免费无禁网站,丰满岳乱妇一区二区三区,男插女高潮一区二区

dede5.7各種偽靜態(tài)設(shè)置方法

技術(shù)分享 2019-10-01 00:00:00
dede5.7偽靜態(tài)設(shè)置方法,dede5.7偽靜態(tài)設(shè)置方法1、后臺-系統(tǒng)參數(shù)-核心設(shè)置-是否使用偽靜態(tài):選擇“是”;
注:你的網(wǎng)站空間是否支持偽靜態(tài),你可以與空間的IDC商聯(lián)系一下,如果是自己的服務(wù)器,那就更好辦了,自己動手,豐衣足食。一般來說,空間都是支持偽靜態(tài)的。Apache服務(wù)器偽靜態(tài)相對簡單,直接在.htaccess文件中加入相應(yīng)偽靜態(tài)規(guī)則即可;而IIS服務(wù)器偽靜態(tài)的實現(xiàn),則需要加載Rewrite組件,然后配置httpd.ini文件。
2、如果你的網(wǎng)站已經(jīng)存在生成的靜態(tài)欄目或文章HTML,那么只需在后臺-系統(tǒng)-SQL命令行工具中執(zhí)行如下語句:

將所有文檔設(shè)置為“僅動態(tài)瀏覽”:

update dede_archives set ismake=-1

將所有欄目設(shè)置為“使用動態(tài)頁”:

update dede_arctype set isdefault=-1

3、列表頁、文章頁偽靜態(tài)修改

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

4、列表分頁偽靜態(tài)修改

打開/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、文章分頁偽靜態(tài)
打開/include/arc.archives.class.php,找到獲取動態(tài)的分頁列表GetPagebreakDM()函數(shù)末尾處:
查找:
$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標(biāo)簽偽靜態(tài)
DedeCms默認的TAG標(biāo)簽URL,形如/tags.php?/dedecms模板 /,是不是覺得有個問號不怎么爽,我們改成/tags/dedecms模板 /,是不是好看多了。
下面我們來改一下,打開/include/taglib/tag.lib.php:
查找:
$row = $cfg_cmsurl."/tags.php?/".urlencode($row)."/";
替換為
$row = $cfg_cmsurl."/tags/".urlencode($row)."/";
這樣就修改好了,上傳你到你的網(wǎng)站,切記:要記得將原網(wǎng)站備份哦??!
7、httpd.ini偽靜態(tài)規(guī)則:



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


將上面代碼保存為:httpd.ini 上傳到網(wǎng)站的根目錄。
如無特特殊需求建議采用官方默認的生成靜態(tài)的頁面方式瀏覽。
咨詢小瓶科技
咨詢我們
頂部