<?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>dan.thoughts &#187; domains</title>
	<atom:link href="http://blog.sosedoff.com/tag/domains/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sosedoff.com</link>
	<description>Web-development, PHP, Ruby, Sinatra, Merb, Rails, MySQL, SQLite, Web Services.</description>
	<lastBuildDate>Sat, 03 Jul 2010 05:46:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rewrite subdomains with nginx 0.6.x</title>
		<link>http://blog.sosedoff.com/2009/01/15/rewrite-subdomains-with-nginx-06x/</link>
		<comments>http://blog.sosedoff.com/2009/01/15/rewrite-subdomains-with-nginx-06x/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 10:25:56 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[rewrite rules]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=8</guid>
		<description><![CDATA[Problem: You have a domain name &#8216;www.domain.com&#8217; that needs to be redirected to &#8216;domain.com&#8217;.
Solution:

In your nginx config file (i`m keeping all configs for all sites separate in different files), befor &#8217;server&#8217; block configuration you should put this piese of code:

server {
    server_name www.domain.com;
    rewrite ^(.*) http://domain.com$1 permanent;
}
server {
... actual [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> You have a domain name &#8216;www.domain.com&#8217; that needs to be redirected to &#8216;domain.com&#8217;.</p>
<p><strong>Solution:<br />
</strong><br />
In your nginx config file (i`m keeping all configs for all sites separate in different files), befor &#8217;server&#8217; block configuration you should put this piese of code:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">server {
    server_name www.domain.com;
    rewrite ^(.*) http://domain.com$1 permanent;
}
server {
... actual server configuration ...
}</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2009/01/15/rewrite-subdomains-with-nginx-06x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
