您现在的位置是:首页 > 教程 > dedecms教程dedecms教程
织梦dedecmsV5.7 TAG伪静态IIS_rewrite配置方法教程
念露2024-06-02 19:08:36dedecms教程已有人查阅
导读id IIS Rewrite include1、因为没有像PHP自带的ReWrite模块,所以需要下载IIS Rewrite模块:
id IIS Rewrite include
方法
1、因为没有像PHP自带的ReWrite模块,所以需要下载IIS Rewrite模块:
2、将压缩包解压到任意目录,(如:C:\Rewrite)。然后打开“控制面板”-“管理工具”-“IIS信息服务管理器”-“网站”-“您的站点”-“属性”。在“ISAPI筛选器”项点击 “添加”,筛选器名称填入Rewrite,可执行文件为C:\Rewrite\Rewrite.dll ;
3、然后修改httpd.ini 文件,添加相应的过滤规则,例如:
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?/关键词。
方法
1、因为没有像PHP自带的ReWrite模块,所以需要下载IIS Rewrite模块:
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织梦channelartlist标签不支持currentstyle属性的解决方法
打开include\taglib\channelartlist.lib.php在此行代码下方增加以下代码:找到$pv->Fields[typeurl]=GetOneTypeUrlA( -
织梦dedecms后台添加缩略图地址style变了怎么办
如果在上传缩略图时是输入的图片路径,而不是上传图片,在路径中会多出字符,这是官方为了过滤而设定的。比如:上传图片路径为:/style/image/c -
织梦dedecms实现显示访问者ip地址的办法
有时候我们需要在网站底部或其他地方显示访问者IP地址,这样我们可以在需要的位置放以下代码来显示: -
dede织梦channelartlist标签调用实例代码
最近开始研究了一些织梦模板的标签语法。今天我将深层次研究channelartlist标签,大家都知道在织梦模板的系统中,我们可以用这个标签进行循环子栏目及其栏目的文档数据
留言与评论 (共有 条评论) |