DEDE默认分类分页地址存在不同URL相同内容问题,导致内容重复,对优化非常不利。情况如下分页列表:
<li><a rel="nofollow noopener noreferrer" href='list_4_1.html'>首页</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_3.html'>上一页</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_1.html'>1</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_2.html'>2</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_3.html'>3</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_4.html'>4</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_5.html'>5</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_5.html'>下一页</a></li>
<li><a rel="nofollow noopener noreferrer" href='list_4_5.html'>末页</a></li>
<li><a rel="nofollow noopener noreferrer" href="/xc/">首页</a></li>
<li><a rel="nofollow noopener noreferrer" href="xc-3.html">上一页</a></li>
<li><a rel="nofollow noopener noreferrer" href="/xc/">1</a></li>
<li><a rel="nofollow noopener noreferrer" href="xc-2.html">2</a></li>
<li><a rel="nofollow noopener noreferrer" href="xc-3.html">3</a></li>
<li>4</li>
<li><a rel="nofollow noopener noreferrer" href="xc-5.html">5</a></li>
<li><a rel="nofollow noopener noreferrer" href="xc-6.html">6</a></li>
<li><a rel="nofollow noopener noreferrer" href='xc-5.html'>下一页</a></li>
<li><a rel="nofollow noopener noreferrer" href='xc-6.html'>末页</a></li>
$typedir= ereg_replace('{cmspath}',$GLOBALS['cfg_cmspath'],$this->Fields['typedir']);
if($this->PageNo != 1)
{
$prepage.="<li><a rel="nofollow noopener noreferrer" href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li>\r\n";
$indexpage="<li><a rel="nofollow noopener noreferrer" href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li>\r\n";
}
if($this->PageNo != 1)
{
if($prepagenum==1)
{
$prepage.="<li><a rel="nofollow noopener noreferrer" href=\"".$typedir."/\">上一页</a></li>\r\n";
}
else
{
$prepage.="<li><a rel="nofollow noopener noreferrer" href=\"".str_replace("{page}",$prepagenum,$tnamerule)."\">上一页</a></li>\r\n";
}
$indexpage="<li><a rel="nofollow noopener noreferrer" href=\"".$typedir."/\">首页</a></li>\r\n";
}
$listdd.="<li><a rel="nofollow noopener noreferrer" href=’".str_replace("{page}",$j,$tnamerule)."'>".$j."</a></li>\r\n";
if($j==1)
{
$listdd.="<li><a rel="nofollow noopener noreferrer" href=\"".$typedir."/\">".$j."</a></li>\r\n";
}
else
{
$listdd.="<li><a rel="nofollow noopener noreferrer" href=\"".str_replace("{page}",$j,$tnamerule)."\">".$j."</a></li>\r\n";
}
本文织梦DEDECMS分页修改和美化到此结束。宽容是化解一切仇恨的最好办法,谅解是解决问题的关键。小编再次感谢大家对我们的支持!