婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > DEDECMS 在 godaddy 空間的偽靜態設置方法詳解

DEDECMS 在 godaddy 空間的偽靜態設置方法詳解

POST TIME:2018-10-30 11:25

不會正則,模仿加修改(花了N多個小時),終于能正常運行了,不知道寫得對不對,說一說讓需要的友友們參考

首先,建一個web.config 放在根目錄下,web.config 內容為

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite to index.php">
<match url="/index.html$" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="Rewrite to list.php">
<match url="^plus/list-([0-9]+).html$" />
<action type="Rewrite" url="plus/list.php?tid={R:1}" />
</rule>
<rule name="Rewrite to list.php?">
<match url="^plus/list-([0-9]+)-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="plus/list.php?tid={R:1}&TotalResult={R:2}&PageNo={R:3}" />
</rule>

<rule name="Rewrite to view.php">
<match url="^plus/view-([0-9]+)-([0-9]+).html$" />
<action type="Rewrite" url="plus/view.php?aid={R:1}&pageno={R:2}" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" resp*****eEncoding="utf-8" fileEncoding="utf-8" />
</system.web>
</configuration>

2、在dedecms 后臺的“系統設置”–“基本參數設置”–“核心設置”(核心設置中的“是否使用偽靜態”把“是”選上)

這時,“文章內容顯示頁”的偽靜態已經算是設置好了。

3、如果還想將列表頁面設置成偽靜態的,則要改一下 include 目錄下的 channelunit.func.php 文件即 (include/channelunit.func.php )

大約在164行會發現這樣的代碼:
//動態
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
把這句“$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; ”注釋掉

加上下面的這幾句代碼

/**修改欄目偽靜態 by 163pinger***/
global $cfg_rewrite;
if($cfg_rewrite == ‘Y’) {
$reurl = $GLOBALS["cfg_plus_dir"]."/list-".$typeid.".html";
}else{
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;
}
/**修改欄目偽靜態 by 163pinger***/

最后保存,好了,試一下,是不是變成偽靜態了呢?! (最后要記得,發表文章或建欄目時把“僅動態”選上



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

  • 400-1100-266
主站蜘蛛池模板: 鸡东县| 芷江| 资兴市| 巴楚县| 扎鲁特旗| 嘉黎县| 邹平县| 建始县| 永登县| 万盛区| 金沙县| 米泉市| 肥乡县| 屯昌县| 石嘴山市| 肇庆市| 香港| 高陵县| 岳西县| 获嘉县| 康保县| 禄丰县| 黄平县| 海丰县| 宝山区| 梧州市| 磐安县| 婺源县| 榆林市| 分宜县| 临颍县| 灵台县| 兴和县| 丰城市| 南昌县| 曲阜市| 肃宁县| 买车| 金秀| 磐安县| 登封市|