帝国论坛帝国cms插件 帝国系统完整制作GOOGLE SITEMAP的方法
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url><loc>http://www.yoursite.com</loc> </url>
[listsonclass]'0',0,0,0,3,地图标签ID,0,0[/listsonclass]
</urlset>
(以下添加非终极栏目的sitemap)
2、页面名称:网站地图1
文件名: ../../sitemap1.xml
页面内容:
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url><loc>http://www.yoursite.com</loc> </url>
[listsonclass]栏目ID,3000,0,0,0,地图标签ID,0,0[/listsonclass]
</urlset>
3、页面名称:网站地图2
文件名: ../../sitemap2.xml
页面内容:
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url><loc>http://www.yoursite.com</loc> </url>
[listsonclass]栏目ID,3000,0,0,0,地图标签ID,0,0[/listsonclass]
</urlset>
......
网站地图3网站地图4网站地图5网站地图6....除文件名外和栏目ID改变外其他同样.
4.制作地图索引页
页面名称:网站地图索引页
文件名: ../../sitemap_index.xml
页面内容:
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
<sitemap>
<loc>http://www.yoursite.com/sitemap999.xml</loc>
<lastmod>[ecmsinfo]'0',1,0,0,3,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap1.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap2.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap3.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap4.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap5.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
<sitemap>
<loc>http://www.yoursite.com/sitemap6.xml</loc>
<lastmod>[ecmsinfo]栏目ID,1,0,0,0,地图索引标签ID,0[/ecmsinfo]</lastmod>
</sitemap>
</sitemapindex>
四、后台 -> 数据更新
刷新所有自定义页面。
五、到GOOGLE管理员页面登录提交sitemap_index.xml及所有sitemap.
说明:sitemap999.xml是网站大类栏目地址的地图(不包括具体文章地址),其他sitemap1,sitemap2.....是各个非终极栏目的地图(包括下面终极栏目的地址和具体文章地址),sitemap_index是所有地图索引。这样就基本上一网打尽了帝国系统的所有网址了。
还有sitemap文件不能过大,如果再加上服务器线路不好的情况下,也容易造成GOOGLE收录出错,这时请适当减小网站地图中[listsonclass]栏目ID,3000,...[/listsonclass]中的“3000”数目。这个参数并不是控制sitemap文件的收录数量,而是控制每个终极栏目加入的文章数量。
个人经验,一个单个的sitemap控制在3MB左右,GOOGLE是可以接受的。
提交成功后,以后网站有更新时,在帝国后台刷新一下相应的自定义sitemap页面即可。