<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Use PHP to Force www Subdomain to a URL</title>
	<atom:link href="http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url</link>
	<description>Miscellanious Ramblings of a Web Developer in the Metro Vancouver area. Technology, Web Development, Photography, Computers and Outdoor Activities</description>
	<lastBuildDate>Fri, 03 Sep 2010 20:03:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: scott ryan</title>
		<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/comment-page-1#comment-234</link>
		<dc:creator>scott ryan</dc:creator>
		<pubDate>Thu, 19 Jul 2007 13:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.tyleringram.com/?p=82#comment-234</guid>
		<description>buddy thanks for the great tip</description>
		<content:encoded><![CDATA[<p>buddy thanks for the great tip</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler Ingram</title>
		<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/comment-page-1#comment-233</link>
		<dc:creator>Tyler Ingram</dc:creator>
		<pubDate>Wed, 18 Jul 2007 22:28:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.tyleringram.com/?p=82#comment-233</guid>
		<description>Derek: Oh yes the 301 redirect, I did that for people who went to my old URL, I guess I could do it for this as well. Good Point

Damien: Thanks for posting the Wordpress plugin, I am sure people will find that useful since I&#039;d say like 90% of bloggers use WordPress. I could be wrong though hehe but most people I know use WordPress

Justin: Thanks for visiting!</description>
		<content:encoded><![CDATA[<p>Derek: Oh yes the 301 redirect, I did that for people who went to my old URL, I guess I could do it for this as well. Good Point</p>
<p>Damien: Thanks for posting the Wordpress plugin, I am sure people will find that useful since I&#8217;d say like 90% of bloggers use WordPress. I could be wrong though hehe but most people I know use WordPress</p>
<p>Justin: Thanks for visiting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/comment-page-1#comment-232</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 18 Jul 2007 13:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.tyleringram.com/?p=82#comment-232</guid>
		<description>Thanks for the advice! I was going to add a subdomain to mine, but wasn&#039;t sure how to handle it with for SEO purposes.</description>
		<content:encoded><![CDATA[<p>Thanks for the advice! I was going to add a subdomain to mine, but wasn&#8217;t sure how to handle it with for SEO purposes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien</title>
		<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/comment-page-1#comment-231</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Wed, 18 Jul 2007 11:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.tyleringram.com/?p=82#comment-231</guid>
		<description>I use a Wordpress plugin for that:

http://txfx.net/code/wordpress/enforce-www-preference/

It makes sense you should do it for optimal search results.</description>
		<content:encoded><![CDATA[<p>I use a Wordpress plugin for that:</p>
<p><a href="http://txfx.net/code/wordpress/enforce-www-preference/" rel="nofollow">http://txfx.net/code/wordpress/enforce-www-preference/</a></p>
<p>It makes sense you should do it for optimal search results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DerekBeau</title>
		<link>http://www.tyleringram.com/blog/use-php-to-force-www-subdomain-to-a-url/comment-page-1#comment-230</link>
		<dc:creator>DerekBeau</dc:creator>
		<pubDate>Wed, 18 Jul 2007 02:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.tyleringram.com/?p=82#comment-230</guid>
		<description>This is a technique that I always implement, but with .htaccess files.  I like doing in in a .htaccess file so that the page doesn&#039;t have to actually be refreshed... the redirect happens within the request.

For your PHP example, you should put this before your header location so the search engines know there is only one page, not two:

header(&quot;HTTP/1.1 301 Moved Permanently&quot;);</description>
		<content:encoded><![CDATA[<p>This is a technique that I always implement, but with .htaccess files.  I like doing in in a .htaccess file so that the page doesn&#8217;t have to actually be refreshed&#8230; the redirect happens within the request.</p>
<p>For your PHP example, you should put this before your header location so the search engines know there is only one page, not two:</p>
<p>header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
