在帝国后台自定义页面
添加一个自定义页面名为:sitemap网站地图
文件名: ../../sitemap.xml
页面内容:
<?='<?xml version="1.0" encoding="gb2312"?>'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.piis.vip</loc>
<priority>1.000</priority>
</url>
[e:loop={"select * from [!db.pre!]enewsclass order by myorder",0,24,0}]
<?
if($bqr['classurl']=='')
{
$sccurl=$public_r['newsurl'].$bqr['classpath']."/";
}
else
{
$sccurl=$bqr['classurl']."/";
}
?>
<url>
<loc>http://www.piis.vip<?=$sccurl?></loc>
<priority>0.6000</priority>
</url>
[/e:loop]
[e:loop={"select * from [!db.pre!]enewszt order by ztid",0,24,0}]
<?
if($bqr['zturl']=='')
{
$sccurl=$public_r['newsurl'].$bqr['ztpath']."/";
}
else
{
$sccurl=$bqr['zturl']."/";
}
?>
<url>
<loc>http://www.piis.vip<?=$sccurl?></loc>
<priority>0.6000</priority>
</url>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news order by newstime",0,24,0}]
<url>
<loc>http://www.piis.vip<?=$bqsr[titleurl]?></loc>
<priority>0.5000</priority>
</url>
[/e:loop]
</urlset>
TAGS :