您现在的位置是:首页 > 教程 > 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织梦后台出现输入内容存在危险字符,安全起见,已被本站拦截
由于织梦官方补丁更新较慢,且有很多DedeCms网站因为安全问题被黑客攻击,中了木马或是后门程序,导致我们的织梦网站非常危险,黑客可以利用网站进行流量劫持,挂木马,做钓鱼等。 -
dedecms5.7首页调用问答的方法
最近将小站的织梦模板从V5.6升级到了V5.7,但发现一个问题:我在首页调用的问答,只能够调出问题,但链接却是错误的。经过查找资料发现,织梦模板的V5.7版本重新写了问答模块代码 -
织梦dedecms图集在首页列表页调用并且自定义输出几张的方法
不改动官方核心文件,在自定义方法文件里加入个方法来实现打开 \include\extend.func.php 在最下面加入这个方法function G -
dede织梦网站地图sitemap移出data目录的方法
站长朋友都知道,DEDECMS默认生成的rss地图以及网站地图等都是生成在DATA的文件夹中,但是这个是一个 非常重要的文件夹,一般我们在 Robots.txt 是禁止搜索引擎爬行这文件夹的
留言与评论 (共有 条评论) |