关于dedecms的标签地址优化 高手来哦
规则如下: [ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
# DEDECMS栏目内页伪静态规则
RewriteRule ^()/index\html $1/index\php
RewriteRule ^()/list-([0-9]+)\html $1/plus/list\php\tid=$2
RewriteRule ^()/list-([0-9]+)-([0-9]+)-([0-9]+)\html $1/plus/list\php\tid=$2&TotalResult=$3&PageNo=$4
RewriteRule ^()/view-([0-9]+)-([0-9]+)\html $1/plus/view\php\arcID=$2&pageno=$3
以上规则代码请放置到dede根目录httpdini文件中,
找到include\helpers\archivehelperphp文件130行,
// $tags = ($tags=='' $row['tag'] : ','$row['tag']);
将其注释掉用
$tags = "<a href='/tagsphp/"urlencode($row['tag'])"'>"$row['tag']"</a>";替换
一、dede后台开启伪静态
二、修改 /include/taglib/taglibphp
找到
$row['link'] = $cfg_cmsurl”/tagsphp/”urlencode($row['keyword'])”/”;
改成
$row['link'] = $cfg_cmsurl”/tags/”urlencode($row['keyword'])”html”;
三、打开templets/default/taglisthtm
找到
<strong>当前位置:</strong>:<a href=”{dede:globalcfg_cmsurl/}/”>主页</a> > <a href=’tagsphp’>TAG标签</a> > {dede:fieldtitle /}
修改为
<strong>当前位置:</strong>:<a href=”{dede:globalcfg_cmsurl/}/”>主页</a> > <a href=’/tagshtml’>TAG标签</a> > {dede:fieldtitle /}
四、httpdini 或者 htaccess 文件里加
RewriteRule ^()/tags\html $1/tags\php
RewriteRule ^()/tags/()html $1/tags\php\$2
0条评论