Intermediary transaction SEO diagnosis Taobao guest Cloud host technology Hall
Do the site's friends believe that the dream dedecms will not be unfamiliar, a lot of webmaster Friends of the site may be the Dede of the core set up, but a lot of friends to the website changed suit. Search Engine Optimization seo for most of the importance of the site is also self-evident, how better to use Dedecms to do SEO? This will be the focus of this article.
Dream dedecms program itself for SEO optimization has done a relatively fine, flexibility is also strong, I believe that she has been one of the reasons for love. But nothing is perfect, Dede although has done enough work, but there are always some details of things, want us to find, to modify, to flexible use, such as Dream dedecms column list paging link optimization.
First look at the Dede default column list page links:
<li><a href= ' list_4_1.html ' > Home </a></li>
<li><a href= ' list_4_3.html ' > prev </a></li>
<li><a href= ' list_4_1.html ' >1</a></li>
<li><a href= ' list_4_2.html ' >2</a></li>
<li><a href= ' list_4_3.html ' >3</a></li>
<li class= "ThisClass" >4</li>
<li><a href= ' list_4_5.html ' >5</a></li>
<li><a href= ' list_4_5.html ' > next page </a></li>
<li><a href= ' list_4_5.html ' > Last </a></li>
This link is actually not very reasonable, back to the list of the first page of the address into a list_4_1.html, which has inadvertently dispersed the weight of the column page. If this is the list of http://www.abc.com/abc/this column link, the following link is more reasonable:
<li><a href= '/abc/' > Home </a></li>
<li><a href= ' list_4_3.html ' > prev </a></li>
<li><a href= '/abc/' >1</a></li>
<li><a href= ' list_4_2.html ' >2</a></li>
<li><a href= ' list_4_3.html ' >3</a></li>
<li class= "ThisClass" >4</li>
<li><a href= ' list_4_5.html ' >5</a></li>
<li><a href= ' list_4_5.html ' > next page </a></li>
<li><a href= ' list_4_5.html ' > Last </a></li>
I've found some ways to do this on the Internet, but a lot of it can not be used, of course, there are also available, but there will be a condition: the premise of using this method is generated column list page to be placed in the root folder of the column (that is, only the first level of the column applicable).
And a lot of friends of the Site column list page is not placed in the root directory (especially level two column), how to do? After in-depth research and expert advice, I successfully modified the predecessors of the method, so that the column list page regardless of the root folder is the same application. The following focuses on the method (for example, version 5.6):
1. Find \include\arc.listview.class.php this file, will
$typedir = Ereg_replace (' {cmspath} ', $GLOBALS [' Cfg_cmspath '], $this->fields[' Typedir ']);
This code is added to the "//Get link to previous page and home page" front;
2. Find the following lines of code (just under "//Get links to previous page and home page")
if ($this->pageno!= 1)
{
$prepage. = "<li><a href= '". Str_replace ("{page}", $prepagenum, $tnamerule). "' > Prev </a></li>\r\n ";
$indexpage = "<li><a href=". Str_replace ("{page}", 1, $tnamerule). "' > Home </a></li>\r\n ";
}
Change to:
if ($this->pageno!= 1)
{
if ($prepagenum ==1)
{
$prepage. = "<li><a href=\" ". $typedir." /\ "> Prev </a></li>\r\n";
}
Else
{
$prepage. = "<li><a href=\" ". Str_replace (" {page} ", $prepagenum, $tnamerule)." \ "> Prev </a></li>\r\n";
}
$indexpage = "<li><a href=\" ". $typedir." /\ "> Home </a></li>\r\n";
}
3. Find
$LISTDD. = "<li><a href= '". Str_replace ("{page}", $j, $tnamerule). "' > ". $j." </a></li>\r\n ";
Change to:
if ($j ==1)
{
$LISTDD. = "<li><a href=\" ". $typedir." /\ ">". $j. " </a></li>\r\n ";
}
Else
{
$LISTDD. = "<li><a href=\" ". Str_replace (" {page} ", $j, $tnamerule)." \ > $j. " </a></li>\r\n ";
}
All right, just 3 steps. And in this file, the list pagination style can also be directly modified. Effect reference: http://www.duanwenxue.com/sanwen/suibi/. After this modification, it is no longer a link such as list_4_1.html, but it is directly linked to an address such as/abc/. Although this is only a small detail of the changes, but small details sometimes play a role can not be underestimated. This change to ensure that the link back to the default list page, to avoid the loss of weight, more in line with the practice of SEO.
There will be other changes in the details will be slowly shared out, please pay attention to Weven into a blog.
Original address: http://www.weiwencheng.com/archives/105
Respect the author, reprint please indicate the source. If you encounter problems in the process of modification, you can leave a message in my blog, I will do a modest strength, as far as possible to help everyone.