织梦dedeCMS网站tag标签静态化方法

织梦cms网站tag标签静态化解决办法如下

1.打开系统根目录tags.php文件,搜索:$tag = FilterSearch(urldecode($tag));
替换为:$tag = urldecode($tag);

 

2.打开文件arc.taglist.class.php,路径:include/arc.taglist.class.php

搜索:$this->TagInfos = $this->dsql->GetOne("Select * From `dede_tagindex` where taglike '{$this->Tag}' ");

替换为:$this->TagInfos = $this->dsql->GetOne("Select * From `dede_tagindex` where id like'{$this->Tag}' ");

3.打开文件tag.lib.php 路径:include/taglib/tag.lib.php

搜索:$row['keyword'] = $row['tag']; 将$row['tag']更改为$row['id']

替换为:$row['link'] = $cfg_cmsurl."/tags.php?/".$row['keyword']."/";

 

替换为:$row['link'] = $cfg_cmsurl."/tags/".urlencode($row['id']);

增加伪静态规则:RewriteRule ^tags/(.*)$ /tags.php?/$1

文章来源:http://www.chinawe.net/gonglve/1685062711.html

 
posted @ 2023-05-29 14:51  kaiser099  阅读(9)  评论(0编辑  收藏  举报