dedecms TAG伪静态

dedecms TAG伪静态  

一、dede后台开启伪静态

二、修改 /include/taglib/tag.lib.php,找到:

$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
改成
$row['link'] = $cfg_cmsurl."/tags/".urlencode($row['keyword']).".html";

 三、打开templets/default/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.html'>TAG标签</a> > {dede:field.title /}

 四、伪静态设置 httpd.ini 文件里加

RewriteRule ^(.*)/tags\.html $1/tags.php;
RewriteRule ^(.*)/tags/(.*).html $1/tags.php?/$2; 

 nginx 的伪静态规则

rewrite ^(.*)/tags\.html $1/tags.php;
rewrite ^(.*)/tags/(.*).html $1/tags.php?/$2;

 

你可能感兴趣的:(dedecms,TAG伪静态)