<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[北京SEO_北京SEO培训 - 【元创SEO】]]></title> 
<link>http://www.yuan-chuang.cc/index.php</link> 
<description><![CDATA[元创拥有10多年网络营销和SEO实战经验、管理经验。 《SEO实战 - 核心技术、优化策略、流量提升》一书作者。SEO实战家、推一把联合创始人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[北京SEO_北京SEO培训 - 【元创SEO】]]></copyright>
<item>
<link>http://www.yuan-chuang.cc/read.php/32.htm</link>
<title><![CDATA[PHP怎么实现HTTP 301永久重定向]]></title> 
<author>元创 &lt;admin@yourname.com&gt;</author>
<category><![CDATA[SEO策略]]></category>
<pubDate>Tue, 09 Dec 2008 06:02:02 +0000</pubDate> 
<guid>http://www.yuan-chuang.cc/read.php/32.htm</guid> 
<description>
<![CDATA[ 
	PHP怎么实现HTTP 301永久重定向<br/>301，302 都是HTTP状态的编码，都代表着某个URL发生了转移，不同之处在于：301 代表永久性转移(Permanently Moved)，302 代表暂时性转移(Temporarily Moved)。 <br/><br/>　　301 重定向是网页更改地址后对搜索引擎友好的最好方法，只要不是暂时搬移的情况,都建议使用301来做转址，如果我们把一个地址采用301跳转方式跳转的话，搜索引擎会把老地址的PageRank等信息带到新地址，同时在搜索引擎索引库中彻底废弃掉原先的老地址。 <br/><br/>　　在PHP中，一般实现页面跳转的语句如下: <br/>php header(’Location: http://www.wuwx.cn/’); <br/><br/>　　当我们使用工具查看这个HTTP头，发现他返回的是一个HTTP 302临时重定向。而不是我们所期望的HTTP 301永久重定向，注意看下图中的第一行： <br/><a href="http://www.wuwx.cn/wp-content/uploads/2008/06/image.png" target="_blank"><img src="http://www.wuwx.cn/wp-content/uploads/2008/06/image.png" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>应该如何实现HTTP 301永久重定向呢？其实也很简单，只需增加一行代码： <br/>php header(’HTTP/1.1 301 Moved Permanently’); <br/>header(’Location: http://www.wuwx.cn/’); <br/><br/>　　当我们再次查看这个页面的HTTP头的时候，他返回的就是我们所期望的HTTP 301永久重定向了。 <br/><a href="http://www.wuwx.cn/wp-content/uploads/2008/06/image-thumb1.png" target="_blank"><img src="http://www.wuwx.cn/wp-content/uploads/2008/06/image-thumb1.png" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>Tags - <a href="http://www.yuan-chuang.cc/go.php/tags/301%25E6%25B0%25B8%25E4%25B9%2585%25E9%2587%258D%25E5%25AE%259A%25E5%2590%2591/" rel="tag">301永久重定向</a>
]]>
</description>
</item><item>
<link>http://www.yuan-chuang.cc/read.php/32.htm#blogcomment13</link>
<title><![CDATA[[评论] PHP怎么实现HTTP 301永久重定向]]></title> 
<author>lxyjmfe &lt;admin@yourname.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 14 Jan 2009 07:42:09 +0000</pubDate> 
<guid>http://www.yuan-chuang.cc/read.php/32.htm#blogcomment13</guid> 
<description>
<![CDATA[ 
	php 重定向 隐藏
]]>
</description>
</item><item>
<link>http://www.yuan-chuang.cc/read.php/32.htm#blogcomment28</link>
<title><![CDATA[[评论] PHP怎么实现HTTP 301永久重定向]]></title> 
<author>元创 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 01 Feb 2009 10:27:01 +0000</pubDate> 
<guid>http://www.yuan-chuang.cc/read.php/32.htm#blogcomment28</guid> 
<description>
<![CDATA[ 
	今天给WWW.qianyuriyu.com做了个301跳转，方法如下<br/><br/>在根目录下建立新文件夹<br/>文件夹中建立index.php文件 代码如下<br/>&lt;? Header( &quot;HTTP/1.1 301 Moved Permanently&quot; );<br/>Header( &quot;Location: http://www.qianyuriyu.com&quot; );?&gt;<br/><br/>然后设置把域名URL到这个网址<br/>如：qianyuriyu.cn url到 www.qianyuriyu.com/301/index.php<br/>只要打开qianyuriyu.cn页面的连接，都跳转到www.qianyuriyu.com/上面！
]]>
</description>
</item>
</channel>
</rss>