<?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>blog - coda.coza &#187; configuration</title>
	<atom:link href="/blog/tag/configuration/feed" rel="self" type="application/rss+xml" />
	<link>http://coda.co.za/blog</link>
	<description>dress up. leave a false name. be legendary.</description>
	<lastBuildDate>Thu, 23 Jun 2011 05:01:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>One Rule to rule them all</title>
		<link>http://coda.co.za/blog/2008/07/01/one-rule-to-rule-them-all</link>
		<comments>http://coda.co.za/blog/2008/07/01/one-rule-to-rule-them-all#comments</comments>
		<pubDate>Tue, 01 Jul 2008 10:41:54 +0000</pubDate>
		<dc:creator>coda</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://coda.co.za/blog/?p=942</guid>
		<description><![CDATA[I own a number of parked domains that all redirect to this site. The redirection is handled by some Rewrite rules in my Apache server's root .htaccess configuration file. For example:
# redirect domain.co.za
RewriteCond %{HTTP_HOST} ^domain\.co.za$ [NC]
RewriteRule ^(.*)$ http://coda.co.za/$1 [R=301,L]
What bugs me is that I have to add these lines for each domain name, and then [...]]]></description>
			<content:encoded><![CDATA[<p>I own a number of parked domains that all redirect to this site. The redirection is handled by some Rewrite rules in my <a title="The Number One HTTP Server On The Internet" href="http://httpd.apache.org">Apache</a> server's root .htaccess configuration file. For example:</p>
<blockquote><p># redirect domain.co.za<br />
RewriteCond %{HTTP_HOST} ^domain\.co.za$ [NC]<br />
RewriteRule ^(.*)$ http://coda.co.za/$1 [R=301,L]</p></blockquote>
<p>What bugs me is that I have to add these lines for each domain name, and then again for instances when the "www" subdomain prefix is included (I prefer to remove the "www"). Needless to say my .htaccess file is looking mighty bloated these days.</p>
<p>I've hunted around for a more elegant solution with no luck, so here's my question for all the Apache and <acronym title="Regular expression">Regex</acronym> geeks out there: is there a way to list these domains in a Rewrite condition (as an array of sorts) that will also cover the "www" inclusion/exclusion? So something like this:</p>
<blockquote><p>RewriteCond %{HTTP_HOST} ^(domain1.co.za|domain2.com)$ [NC]<br />
RewriteRule ^(.*)$ http://coda.co.za/$1 [R=301,L]</p></blockquote>
<p>The end result I'm hoping for is that "domain1.co.za", "www.domain1.co.za", "domain2.com", "www.domain2.com", etc. will all redirect to "/". Supposing my pipe-delimited array idea isn't possible, what is the most practical way to achieve this?</p>
<img src="/blog/?ak_action=api_record_view&id=942&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://coda.co.za/blog/2008/07/01/one-rule-to-rule-them-all/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

