欢迎来到站长天空!

DedeCMS

当前位置: 主页 > CMS教程 > DedeCMS

DEDECMS 5.1 TAG伪静态IIS_rewrite配置方法

时间:2025-12-07 09:21:59|栏目:DedeCMS|点击:

关键字描述:配置 方法 静态 &rdquo &ldquo id IIS Rewrite include

方法
1、因为没有像PHP自带的ReWrite模块,所以需要下载IIS Rewrite模块:
https://www.freexyz.cn/softs/6192.html
2、将压缩包解压到任意目录,(如:C:\Rewrite)。然后打开“控制面板”-“管理工具”-“IIS信息服务管理器”-“网站”-“您的站点”-“属性”。在“ISAPI筛选器”项点击 “添加”,筛选器名称填入Rewrite,可执行文件为C:\Rewrite\Rewrite.dll ;

3、然后修改httpd.ini 文件,添加相应的过滤规则,例如:

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

RewriteRule ^(.*)/id_([a-z0-9\-] )\.html$ $1/Default\.aspx\?id=$2 [I,O]
http://localhost/id_Text.html 就会等同于 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、重新启动IIS就可以生效了(这一步很重要,每次修改httpd.ini后都要重启 IIS 以加载配置。)

5、然后修改DEDE相关函数:

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

即:把所有链接改为静态地址:tag.php?/ ->tag/

然后再生成相关页面就可以了。

以后就是 /tag/关键词/这种现实了,而不是原来的/tag.php?/关键词。

上一篇:dede删除出错的文章

栏    目:DedeCMS

下一篇:解决DEDECMS网页木马(含iframe/script木马)

本文标题:DEDECMS 5.1 TAG伪静态IIS_rewrite配置方法

本文地址:https://zz.feitang.co/CMSjiaocheng/29094.html

广告投放 | 联系我们 | 版权申明

申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:257218569 | 邮箱:257218569@qq.com

Copyright © 2018-2025 站长天空 版权所有 Powered by EyouCms冀ICP备14023439号