欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

DEDECMS 5.1 TAG偽靜態(tài)IIS_rewrite配置方法

互聯(lián)網(wǎng)   發(fā)布時(shí)間:2009-06-06 15:06:38   作者:jb51   我要評(píng)論
有時(shí)候需要在dedecms中實(shí)現(xiàn)tag的偽靜態(tài),這種表現(xiàn)方法,更利于seo,所以很多朋友喜歡。
關(guān)鍵字描述:配置 方法 靜態(tài) &rdquo &ldquo id IIS Rewrite include

方法
1、因?yàn)闆]有像PHP自帶的ReWrite模塊,所以需要下載IIS Rewrite模塊:
http://www.dbjr.com.cn/softs/6192.html
2、將壓縮包解壓到任意目錄,(如:C:\Rewrite)。然后打開“控制面板”-“管理工具”-“IIS信息服務(wù)管理器”-“網(wǎng)站”-“您的站點(diǎn)”-“屬性”。在“ISAPI篩選器”項(xiàng)點(diǎn)擊 “添加”,篩選器名稱填入Rewrite,可執(zhí)行文件為C:\Rewrite\Rewrite.dll ;

3、然后修改httpd.ini 文件,添加相應(yīng)的過濾規(guī)則,例如:

RewriteRule ^(.*)/([a-z0-9\-\_] )$ $1/Default\.aspx\?id=$2 [I,O]
http://localhost/Text 就會(huì)等同于 http://localhost/Default.aspx?id=Text

RewriteRule ^(.*)/id_([a-z0-9\-] )\.html$ $1/Default\.aspx\?id=$2 [I,O]
http://localhost/id_Text.html 就會(huì)等同于 http://localhost/Default.aspx?id=Text

^(.*)/html/([0-9] )/([0-9] )\.html$ $1/Default\.aspx\?id=$2&name=$3
http://localhost/html/001/007.html 就等同于 http://localhost/Default.aspx?id=001&name=007

DEDE的添加方法(注意:這里是正則方式):

RewriteRule ^(.*)/tag/(.*)/$ $1/tag\.php\?/$2/
RewriteRule ^(.*)/tag/(.*)\.html$ $1/tag\.php\?/$2/

4、重新啟動(dòng)IIS就可以生效了(這一步很重要,每次修改httpd.ini后都要重啟 IIS 以加載配置。)

5、然后修改DEDE相關(guān)函數(shù):

\include\inc_arcpart_view.php
\include\inc_channel_unit_functions.php
\include\inc_pubtag_make.php
\include\inc_taglist_view.php

即:把所有鏈接改為靜態(tài)地址:tag.php?/ ->tag/

然后再生成相關(guān)頁面就可以了。

以后就是 /tag/關(guān)鍵詞/這種現(xiàn)實(shí)了,而不是原來的/tag.php?/關(guān)鍵詞。

相關(guān)文章

最新評(píng)論