wordpress插件之baidu-sitemap-generator
2013-10-20 14:43
399 查看
生成百度 Sitemap XML 文件。就相当于网站被百度--全球最大的中文搜索引擎订阅,进而为您的网站带来潜在的流量。同时生成一个静态的站点地图页面,对所有的搜索引擎都有利。
登录wordpress后台下载baidu-sitemap-generator插件并启用该插件
下面重点介绍如何在SAE上使用baidu-sitemap-generator
在文件的根目录中找到config.yaml文件加入
- rewrite: if ( path ~ "sitemap_baidu.xml" ) goto "wp-content/plugins/baidu-sitemap-generator/SAE_xml.php"
- rewrite: if ( path ~ "sitemap.html" ) goto "wp-content/plugins/baidu-sitemap-generator/SAE_html.php"两句代码
在baidu-sitemap-generator目录下分别新建SAE_html.php和SAE_xml.php文件
加入
<?php
header("Content-Type:text/html");
$f = new SaeFetchurl();
$data = $f->fetch("http://shopsale-wordpress.stor.sinaapp.com/sitemap.html");
echo $data;
?>
和
<?php
header("Content-Type:text/xml");
$f = new SaeFetchurl();
$data = $f->fetch("http://shopsale-wordpress.stor.sinaapp.com/sitemap_baidu.xml");
echo $data;
?>
代码。
http://shopsale.sinaapp.com/conditioner.html
http://shopsale.sinaapp.com/shampoo.html
http://shopsale.sinaapp.com/intestinal_health.html
登录wordpress后台下载baidu-sitemap-generator插件并启用该插件
下面重点介绍如何在SAE上使用baidu-sitemap-generator
在文件的根目录中找到config.yaml文件加入
- rewrite: if ( path ~ "sitemap_baidu.xml" ) goto "wp-content/plugins/baidu-sitemap-generator/SAE_xml.php"
- rewrite: if ( path ~ "sitemap.html" ) goto "wp-content/plugins/baidu-sitemap-generator/SAE_html.php"两句代码
在baidu-sitemap-generator目录下分别新建SAE_html.php和SAE_xml.php文件
加入
<?php
header("Content-Type:text/html");
$f = new SaeFetchurl();
$data = $f->fetch("http://shopsale-wordpress.stor.sinaapp.com/sitemap.html");
echo $data;
?>
和
<?php
header("Content-Type:text/xml");
$f = new SaeFetchurl();
$data = $f->fetch("http://shopsale-wordpress.stor.sinaapp.com/sitemap_baidu.xml");
echo $data;
?>
代码。
http://shopsale.sinaapp.com/conditioner.html
http://shopsale.sinaapp.com/shampoo.html
http://shopsale.sinaapp.com/intestinal_health.html
相关文章推荐
- 微信搜一搜迈出新的一步,好戏来了
- 房产界已上市和IPO路上的难兄难弟:房天下与房多多
- 利用百度地图提供的API做的应用
- 搜狗百度360市值齐跌:搜索引擎们陷入集体焦虑?
- 百度20年:搜索帝国的崛起、式微与重生
- FAT表详解
- 百度全面恢复网站权重,流量暴涨中
- wordpress rewrite问题解决
- Wordpress 忘记密码的处理方法
- 百度 popup.js 完美修正版非常的不错 脚本之家推荐
- 百度空间的popup效果分析第1/3页
- AJAX 支持搜索引擎问题分析
- 模仿百度三维地图的js数据分享
- cos-html-cache关于WordPress的静态化方法
- C#取得Web程序和非Web程序的根目录的N种取法总结
- PHP 得到根目录的 __FILE__ 常量
- 百度最近不收站分析,为什么不收录你的站
- 搜索引擎对关键词作弊判断方法揭密
- php中定义网站根目录的常用方法
- 关于bluehost空间上wordpress后台变为英文的解决方案