<?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>CaptainCodeMonkey.com - All Your Booty Are Belong To Us! &#187; 301 redirect</title>
	<atom:link href="http://www.captaincodemonkey.com/blog/tag/301-redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.captaincodemonkey.com/blog</link>
	<description></description>
	<lastBuildDate>Sat, 01 May 2010 22:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP Permanently Move A Page</title>
		<link>http://www.captaincodemonkey.com/blog/2008/03/01/php-permanently-move-a-page/</link>
		<comments>http://www.captaincodemonkey.com/blog/2008/03/01/php-permanently-move-a-page/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 23:06:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[move a page]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.aprogrammingpro.com/2008/03/01/php-permanently-move-a-page/</guid>
		<description><![CDATA[The proper way to move a page and have search engines properly find it is to use a 301 redirect. The 301 redirect tells the search engines that &#8220;this page has permanently moved&#8221;. I am in the process of redirecting an entire website using 301 redirects, and I will post updates on the impact this [...]]]></description>
			<content:encoded><![CDATA[<p>The proper way to move a page and have search engines properly find it is to use a 301 redirect.  The 301 redirect tells the search engines that &#8220;this page has permanently moved&#8221;.  I am in the process of redirecting an entire website using 301 redirects, and I will post updates on the impact this has on the SEO and search engine placement on the site.  The code to do a 301 redirect in php is as follows:</p>
<blockquote>
<pre><code>&lt;?php

// Permanent redirection

header("HTTP/1.1 301 Moved Permanently");

header("Location: http://www.somacon.com/");

exit();</code></pre>
<pre><code>?&gt;</code></pre>
</blockquote>
<p>Be sure you put the line : header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;); Because as I have recently discovered, just using the header location line does a 302 redirect instead of a 301.  A 302 redirect tells the search engines that &#8220;this page has temporarily moved&#8221;.  So be sure you do this correctly if the page is permanently moving.</p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.captaincodemonkey.com/blog/2008/03/01/php-permanently-move-a-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
