<?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"
	>
<channel>
	<title>Comments on: 301 redirect non-www to www</title>
	<atom:link href="http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html</link>
	<description>My personal space for ideas &#038; information.</description>
	<pubDate>Sat, 11 Oct 2008 12:33:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Huskey</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-45754</link>
		<dc:creator>Huskey</dc:creator>
		<pubDate>Sat, 19 Jan 2008 00:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-45754</guid>
		<description>Sorry for double post. http gets translated to a link and deletes the $.

&lt;code&gt;RewriteRule ^(.*) http://domain.com/$1 [R=301,L]&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Sorry for double post. http gets translated to a link and deletes the $.</p>
<p><code>RewriteRule ^(.*) <a href="http://domain.com/1" rel="nofollow">http://domain.com/1</a> [R=301,L]</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Huskey</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-45753</link>
		<dc:creator>Huskey</dc:creator>
		<pubDate>Sat, 19 Jan 2008 00:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-45753</guid>
		<description>The correct (and complete) form to use for non-www to www is:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*) http://www.domain.com/$1 [R,L]

Similar, for www to non-www:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteRule ^(.*) http://domain.com/$1 [R=301,L]

The &lt;em&gt;$&lt;/em&gt; sign marks a line end, therefore your rule will never trigger for a http://domain.com/something page.</description>
		<content:encoded><![CDATA[<p>The correct (and complete) form to use for non-www to www is:</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^domain\.com [NC]<br />
RewriteRule ^(.*) <a href="http://www.domain.com/1" rel="nofollow">http://www.domain.com/1</a> [R,L]</p>
<p>Similar, for www to non-www:</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]<br />
RewriteRule ^(.*) <a href="http://domain.com/1" rel="nofollow">http://domain.com/1</a> [R=301,L]</p>
<p>The <em>$</em> sign marks a line end, therefore your rule will never trigger for a <a href="http://domain.com/something" rel="nofollow">http://domain.com/something</a> page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lior</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-41789</link>
		<dc:creator>Lior</dc:creator>
		<pubDate>Sat, 22 Dec 2007 13:12:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-41789</guid>
		<description>Will that work for all pages, or just the home page?

I did it, and the only redirect I got is from http://domain.com to http://www.domain.com 

But not from http://domain.com/page.html to http://www.domain.com/page.html

??</description>
		<content:encoded><![CDATA[<p>Will that work for all pages, or just the home page?</p>
<p>I did it, and the only redirect I got is from <a href="http://domain.com" rel="nofollow">http://domain.com</a> to <a href="http://www.domain.com" rel="nofollow">http://www.domain.com</a> </p>
<p>But not from <a href="http://domain.com/page.html" rel="nofollow">http://domain.com/page.html</a> to <a href="http://www.domain.com/page.html" rel="nofollow">http://www.domain.com/page.html</a></p>
<p>??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Art</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-29197</link>
		<dc:creator>Art</dc:creator>
		<pubDate>Fri, 10 Aug 2007 18:54:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-29197</guid>
		<description>Thanks for the tip, i have used it on my paintings site to redirect the non www url to the www url.

thanks :)</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, i have used it on my paintings site to redirect the non www url to the www url.</p>
<p>thanks <img src='http://www.jonsimpson.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yan</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-11214</link>
		<dc:creator>Yan</dc:creator>
		<pubDate>Fri, 23 Mar 2007 22:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-11214</guid>
		<description>Thanks for the tip. Just did it on my sites. Was losing a lot of backlink juice because some would bookmark as www, while some w/o it.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. Just did it on my sites. Was losing a lot of backlink juice because some would bookmark as www, while some w/o it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Benson</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-1369</link>
		<dc:creator>Michael Benson</dc:creator>
		<pubDate>Wed, 21 Jun 2006 16:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-1369</guid>
		<description>You'd have to use;

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]</description>
		<content:encoded><![CDATA[<p>You&#8217;d have to use;</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]<br />
RewriteRule ^(.*)$ <a href="http://domain.com/1" rel="nofollow">http://domain.com/1</a> [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Findlay</title>
		<link>http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-619</link>
		<dc:creator>Paul Findlay</dc:creator>
		<pubDate>Sat, 01 Apr 2006 01:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonsimpson.co.uk/weblog/2006-02-19/301-redirect-non-www-to-www.html#comment-619</guid>
		<description>What would the reverse of this be? i.e. if you wanted to send all visitors to http://www.example.co.uk to http://example.co.uk</description>
		<content:encoded><![CDATA[<p>What would the reverse of this be? i.e. if you wanted to send all visitors to <a href="http://www.example.co.uk" rel="nofollow">http://www.example.co.uk</a> to <a href="http://example.co.uk" rel="nofollow">http://example.co.uk</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
