国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

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

2024-04-25 20:48: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***/

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阿坝县| 儋州市| 左贡县| 梅河口市| 林芝县| 广水市| 九龙县| 且末县| 化德县| 博野县| 乌兰县| 晋宁县| 弥渡县| 弥渡县| 鹤山市| 浦城县| 都兰县| 东丰县| 从江县| 哈尔滨市| 镇康县| 山东| 德清县| 五华县| 三台县| 玉树县| 尚志市| 温州市| 章丘市| 钟山县| 洪江市| 丹棱县| 通许县| 尤溪县| 富裕县| 正安县| 阜平县| 郯城县| 犍为县| 麟游县| 黄龙县|