<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>翱翔白鹭 &#187; SEO技术</title>
	<atom:link href="http://yanglu.org/category/makepage/seo/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanglu.org</link>
	<description>天高任鸟飞，海阔凭鱼跃！</description>
	<lastBuildDate>Wed, 23 Nov 2011 06:04:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>网站换域名后要用到的php301转向代码</title>
		<link>http://yanglu.org/php_301_moved/</link>
		<comments>http://yanglu.org/php_301_moved/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 02:49:35 +0000</pubDate>
		<dc:creator>yanglu</dc:creator>
				<category><![CDATA[Discuz!]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO技术]]></category>

		<guid isPermaLink="false">http://yanglu.org/?p=257</guid>
		<description><![CDATA[只需要把下面的代码加到网站核心文件里，即可对全站的所有页面进行域名301转向，友好搜素引擎转向。 $url_old=&#34;yanglu.org&#34;; //旧域名，不带&#34;http://&#34;和&#34;/&#34;,可不带www $url_new=&#34;www.1qq.cn/&#34;; //新域名，不带&#34;http://&#34;,以&#34;/&#34;结尾 $bbs_dir=&#34;bbs&#34;; //原域名的BBS目录名，根目录请为空 &#160; if &#40;$bbs_dir&#41; &#123; $bbs_count=strlen&#40;$bbs_dir&#41;+2; $url_add=substr&#40;$_SERVER&#91;&#34;REQUEST_URI&#34;&#93;,$bbs_count&#41;; &#125; else &#123; $url_add=substr&#40;$_SERVER&#91;&#34;REQUEST_URI&#34;&#93;,1&#41;; &#125; &#160; if &#40;stripos&#40;$_SERVER&#91;&#34;SERVER_NAME&#34;&#93;,$url_old&#41;&#41; &#123; $url301=&#34;http://&#34;.$url_new.$url_add; header&#40;&#34;HTTP/1.1 301 Moved Permanently&#34;&#41;; header&#40;&#34;Location:$url301&#34;&#41;; exit&#40;&#41;; &#125; 以DISCUZ!（所有版本）为例，只需要把此代码放置于include/common.inc.php的”&#60;?”后面即可。]]></description>
			<content:encoded><![CDATA[<p>只需要把下面的代码加到网站核心文件里，即可对全站的所有页面进行域名301转向，友好搜素引擎转向。</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$url_old</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;yanglu.org&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//旧域名，不带&quot;http://&quot;和&quot;/&quot;,可不带www</span>
<span style="color: #000088;">$url_new</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;www.1qq.cn/&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//新域名，不带&quot;http://&quot;,以&quot;/&quot;结尾</span>
<span style="color: #000088;">$bbs_dir</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bbs&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//原域名的BBS目录名，根目录请为空</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$bbs_dir</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$bbs_count</span><span style="color: #339933;">=</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bbs_dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$url_add</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REQUEST_URI&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$bbs_count</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$url_add</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REQUEST_URI&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;SERVER_NAME&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$url_old</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$url301</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$url_new</span><span style="color: #339933;">.</span><span style="color: #000088;">$url_add</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HTTP/1.1 301 Moved Permanently&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location:<span style="color: #006699; font-weight: bold;">$url301</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>以DISCUZ!（所有版本）为例，只需要把此代码放置于include/common.inc.php的”&lt;?”后面即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://yanglu.org/php_301_moved/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>关注：gubaiyou-谷百优 SEO大赛</title>
		<link>http://yanglu.org/gubaiyou-seo/</link>
		<comments>http://yanglu.org/gubaiyou-seo/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 05:55:01 +0000</pubDate>
		<dc:creator>yanglu</dc:creator>
				<category><![CDATA[SEO技术]]></category>
		<category><![CDATA[谷百优]]></category>

		<guid isPermaLink="false">http://www.9ce.com.cn/?p=94</guid>
		<description><![CDATA[前段时间国内著名站长服务站ADMIN5发起了“站长网启动第三届搜索引擎优化大赛”，目前可谓是进行到火热状态，关键词“谷百优”在百度和谷歌的搜索结果每天都有着变化，每天观看那些竞赛网站学习SEO技术成为我必做的事情，虽然不参与比赛，但这么好的一个学习机会可不能错过，能见到SEOer们的“创造”技术是多么的有能耐，居然凭空创造出谷百优大米、谷百优饮品、谷百优希望小学等内容，不过这也再一次说明“搜索引擎，内容为王”，没有内容是没有好排名，那就想法设法创造出内容！]]></description>
			<content:encoded><![CDATA[<p>前段时间国内著名站长服务站ADMIN5发起了“<a href="http://www.admin5.com/article/20090409/141605.shtml" target="_blank">站长网启动第三届搜索引擎优化大赛</a>”，目前可谓是进行到火热状态，关键词“<strong>谷百优</strong>”在百度和谷歌的搜索结果每天都有着变化，每天观看那些竞赛网站学习SEO技术成为我必做的事情，虽然不参与比赛，但这么好的一个学习机会可不能错过，能见到SEOer们的“创造”技术是多么的有能耐，居然凭空创造出谷百优大米、谷百优饮品、谷百优希望小学等内容，不过这也再一次说明“搜索引擎，内容为王”，没有内容是没有好排名，那就想法设法创造出内容！</p>
]]></content:encoded>
			<wfw:commentRss>http://yanglu.org/gubaiyou-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

