更改tags.php文件在根目錄
找到$tag = FilterSearch(urldecode($tag));
替換為:$tag = urldecode($tag);
更改文件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}' ");
更改文件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']);
(在Apache環境下)
修改taglist.htm模板
<strong>當前位置:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主頁</a> > <a href='tags.php'>TAG標簽</a> > {dede:field.title /}
替換為:
<strong>當前位置:</strong>?<a href="{dede:global.cfg_cmsurl/}/">主頁</a> > <a href='/tags/'>TAG標簽</a> > {dede:field.title /}
.htaccess文件裡增加如下規則:
RewriteEngine On
RewriteBase /
RewriteRule ^tags/(.*)$ /tags.php?/$1
最後在根目錄下robots.txt中添加 Disallow: /tags.php 防止搜索引擎重復收錄。
*