<?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: Redirecting non-www to www with .htaccess</title>
	<atom:link href="http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/</link>
	<description>How am I supposed to know?? Ask Pipo!</description>
	<pubDate>Sun, 01 Aug 2010 08:11:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Francis  Mariani</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-906</link>
		<dc:creator>Francis  Mariani</dc:creator>
		<pubDate>Mon, 19 Jul 2010 23:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-906</guid>
		<description>Sorry I posted before testing properly - I put the .htaccess file
in a directory one level above public_html which is the wrong
location. I put it in public_html and it now works. Thanks.</description>
		<content:encoded><![CDATA[<p>Sorry I posted before testing properly - I put the .htaccess file<br />
in a directory one level above public_html which is the wrong<br />
location. I put it in public_html and it now works. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francis  Mariani</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-905</link>
		<dc:creator>Francis  Mariani</dc:creator>
		<pubDate>Mon, 19 Jul 2010 22:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-905</guid>
		<description>Thanks very much for this post. I created a .htaccess file with
your code copy-pasted for website www.limlum.com. When I type
limlum.com in the web browser address, it redirects to
http://www.limlum.com/public_html/ which does not exist and I get a
404 error. Am I missing another file on the webste?
&lt;code&gt;RewriteEngine On RewriteCond %{HTTP_HOST} !^www\\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks very much for this post. I created a .htaccess file with<br />
your code copy-pasted for website www.limlum.com. When I type<br />
limlum.com in the web browser address, it redirects to<br />
http://www.limlum.com/public_html/ which does not exist and I get a<br />
404 error. Am I missing another file on the webste?<br />
<code>RewriteEngine On RewriteCond %{HTTP_HOST} !^www\\.<br />
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Katalog</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-886</link>
		<dc:creator>Katalog</dc:creator>
		<pubDate>Fri, 18 Jun 2010 14:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-886</guid>
		<description>Great tip, thanks! No more putting full domain name in the
.htaccess file :)</description>
		<content:encoded><![CDATA[<p>Great tip, thanks! No more putting full domain name in the<br />
.htaccess file :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dense13</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-790</link>
		<dc:creator>dense13</dc:creator>
		<pubDate>Mon, 25 Jan 2010 21:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-790</guid>
		<description>That's neater, good thinking.</description>
		<content:encoded><![CDATA[<p>That's neater, good thinking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John M</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-789</link>
		<dc:creator>John M</dc:creator>
		<pubDate>Mon, 25 Jan 2010 21:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-789</guid>
		<description>Oh and do a separate condition/rule for port 443 (SSL)</description>
		<content:encoded><![CDATA[<p>Oh and do a separate condition/rule for port 443 (SSL)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John M</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-788</link>
		<dc:creator>John M</dc:creator>
		<pubDate>Mon, 25 Jan 2010 21:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-788</guid>
		<description>Actually just add this line to the conditions: RewriteCond
%{SERVER_PORT} ^80$ Assuming all your http traffic is on port 80
this will do the trick.</description>
		<content:encoded><![CDATA[<p>Actually just add this line to the conditions: RewriteCond<br />
%{SERVER_PORT} ^80$ Assuming all your http traffic is on port 80<br />
this will do the trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dense13</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-787</link>
		<dc:creator>dense13</dc:creator>
		<pubDate>Mon, 25 Jan 2010 21:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-787</guid>
		<description>&lt;blockquote&gt;Unfortunately this method messes up SSL URLs. https://my-domain.com&lt;br /&gt;gets redirected to: http://www.my-domain.com Not good. :(&lt;/blockquote&gt;

You could create a second .htaccess file in the folder(s) where your SSL pages are, using replacing http for https. I haven't actually tried this, but I'd say it should work.</description>
		<content:encoded><![CDATA[<blockquote><p>Unfortunately this method messes up SSL URLs. https://my-domain.com<br />gets redirected to: http://www.my-domain.com Not good. :(</p></blockquote>
<p>You could create a second .htaccess file in the folder(s) where your SSL pages are, using replacing http for https. I haven't actually tried this, but I'd say it should work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John M</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-786</link>
		<dc:creator>John M</dc:creator>
		<pubDate>Mon, 25 Jan 2010 20:19:51 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-786</guid>
		<description>Unfortunately this method messes up SSL URLs. https://my-domain.com
gets redirected to: http://www.my-domain.com Not good. :(</description>
		<content:encoded><![CDATA[<p>Unfortunately this method messes up SSL URLs. https://my-domain.com<br />
gets redirected to: http://www.my-domain.com Not good. :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: quantro</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-647</link>
		<dc:creator>quantro</dc:creator>
		<pubDate>Thu, 20 Aug 2009 15:56:55 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-647</guid>
		<description>thanks for the code, it's all that i need</description>
		<content:encoded><![CDATA[<p>thanks for the code, it's all that i need</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alecu</title>
		<link>http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-527</link>
		<dc:creator>Alecu</dc:creator>
		<pubDate>Thu, 21 May 2009 09:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/#comment-527</guid>
		<description>The code works perfectly, thank you.</description>
		<content:encoded><![CDATA[<p>The code works perfectly, thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
