<?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: Wildcard DNS and Sub Domains</title>
	<atom:link href="http://ma.tt/2003/10/wildcard-dns-and-sub-domains/feed/" rel="self" type="application/rss+xml" />
	<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/</link>
	<description>Unlucky in Cards</description>
	<lastBuildDate>Sat, 26 May 2012 13:00:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20941</generator>
	<item>
		<title>By: Rohit Sethia</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-514418</link>
		<dc:creator>Rohit Sethia</dc:creator>
		<pubDate>Sun, 12 Jun 2011 16:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-514418</guid>
		<description>Just to add for all and for Shared cPanel Accounts, you should Add:

UseCanonicalName Off 

to your VirtualHost Configuration if it doesn&#039;t Exist.</description>
		<content:encoded><![CDATA[<p>Just to add for all and for Shared cPanel Accounts, you should Add:</p>
<p>UseCanonicalName Off </p>
<p>to your VirtualHost Configuration if it doesn&#8217;t Exist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Combining Multiple Wordpress Installs with Wordpress 3.0 &#171; Little Storping-in-the-Swuff</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-480903</link>
		<dc:creator>Combining Multiple Wordpress Installs with Wordpress 3.0 &#171; Little Storping-in-the-Swuff</dc:creator>
		<pubDate>Thu, 01 Jul 2010 19:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-480903</guid>
		<description>[...] however www.littlestorping.co.uk redirects to littlestorping.co.uk anyway, and some people (eg. Matt Mullenweg) prefer to lose the www anyway.  So I&#8217;ve changed, but I suspect that one or two plugins and [...]</description>
		<content:encoded><![CDATA[<p>[...] however <a href="http://www.littlestorping.co.uk" rel="nofollow">http://www.littlestorping.co.uk</a> redirects to littlestorping.co.uk anyway, and some people (eg. Matt Mullenweg) prefer to lose the www anyway.  So I&#8217;ve changed, but I suspect that one or two plugins and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Job</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-470054</link>
		<dc:creator>Job</dc:creator>
		<pubDate>Fri, 23 Oct 2009 13:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-470054</guid>
		<description>This could be because this blog post is linked in the WPMU setup (if the installation fails to resolve a random subdomain, it informs you that the wildcard DNS isn&#039;t configured, and refers to this post for detailed explanation).</description>
		<content:encoded><![CDATA[<p>This could be because this blog post is linked in the WPMU setup (if the installation fails to resolve a random subdomain, it informs you that the wildcard DNS isn&#8217;t configured, and refers to this post for detailed explanation).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Dingman</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-469553</link>
		<dc:creator>Jonathan Dingman</dc:creator>
		<pubDate>Sun, 04 Oct 2009 07:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-469553</guid>
		<description>This is still one of the best tutorials I&#039;ve seen around, I am constantly referencing this post to people about how to setup wildcard domains.

Thanks Matt!</description>
		<content:encoded><![CDATA[<p>This is still one of the best tutorials I&#8217;ve seen around, I am constantly referencing this post to people about how to setup wildcard domains.</p>
<p>Thanks Matt!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Droppelman</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-468428</link>
		<dc:creator>Curtis Droppelman</dc:creator>
		<pubDate>Tue, 25 Aug 2009 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-468428</guid>
		<description>Looks like I&#039;ve answered my question by finding a great plugin a few hours later. 

WordPress MU Domain Mapping
http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/</description>
		<content:encoded><![CDATA[<p>Looks like I&#8217;ve answered my question by finding a great plugin a few hours later. </p>
<p>WordPress MU Domain Mapping<br />
<a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/" rel="nofollow">http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devon_O</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-458392</link>
		<dc:creator>Devon_O</dc:creator>
		<pubDate>Sun, 01 Mar 2009 18:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-458392</guid>
		<description>As disappointed as I am by this fact, I just don&#039;t get it. :-( </description>
		<content:encoded><![CDATA[<p>As disappointed as I am by this fact, I just don&#039;t get it. <img src='http://s.ma.tt/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-450738</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sat, 30 Aug 2008 19:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-450738</guid>
		<description>Thanks for the suggestion - this was just copied from my httpd.conf so it was doing something ,but it might have been cPanel specific. I&#039;ve removed those two lines. Crazy that 5 years later people still use this.</description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion &#8211; this was just copied from my httpd.conf so it was doing something ,but it might have been cPanel specific. I&#8217;ve removed those two lines. Crazy that 5 years later people still use this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich Bowen</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-450547</link>
		<dc:creator>Rich Bowen</dc:creator>
		<pubDate>Wed, 27 Aug 2008 19:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-450547</guid>
		<description>You can&#039;t put User and Group in a  block and expect them to do anything useful, so it would be really helpful if you&#039;d remove that from your example configuration, since it&#039;s misleading people who are using this as an example configuration, and expecting that User directive to have an actual effect on the user permissions that the vhost runs with. Thanks.

--Someone who provides user support on #apache.</description>
		<content:encoded><![CDATA[<p>You can&#8217;t put User and Group in a  block and expect them to do anything useful, so it would be really helpful if you&#8217;d remove that from your example configuration, since it&#8217;s misleading people who are using this as an example configuration, and expecting that User directive to have an actual effect on the user permissions that the vhost runs with. Thanks.</p>
<p>&#8211;Someone who provides user support on #apache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Paquet</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-442973</link>
		<dc:creator>Kevin Paquet</dc:creator>
		<pubDate>Fri, 02 May 2008 09:40:21 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-442973</guid>
		<description>It&#039;s gonna take me a long long time to understand this, I&#039;m a total noob. I want WP MU installed *sigh*</description>
		<content:encoded><![CDATA[<p>It&#8217;s gonna take me a long long time to understand this, I&#8217;m a total noob. I want WP MU installed *sigh*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bozhidar</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-442509</link>
		<dc:creator>bozhidar</dc:creator>
		<pubDate>Wed, 23 Apr 2008 23:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-442509</guid>
		<description>Actually it is on the spot for me, and it very nicely written THANKS ALLOT!! you saved me some time in configuration something :) please do continue the nice work :)</description>
		<content:encoded><![CDATA[<p>Actually it is on the spot for me, and it very nicely written THANKS ALLOT!! you saved me some time in configuration something <img src='http://s.ma.tt/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  please do continue the nice work <img src='http://s.ma.tt/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Multi User Web Hosting: WPMU From Scratch &#124; Hard Headed Hosting</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-439012</link>
		<dc:creator>Multi User Web Hosting: WPMU From Scratch &#124; Hard Headed Hosting</dc:creator>
		<pubDate>Sun, 24 Feb 2008 11:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-439012</guid>
		<description>[...] to WPMU installation. If not, there are notes in the README file, but please note that the link for DNS advice has changed [...]</description>
		<content:encoded><![CDATA[<p>[...] to WPMU installation. If not, there are notes in the README file, but please note that the link for DNS advice has changed [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-01-31@kobak pont org</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-438169</link>
		<dc:creator>links for 2008-01-31@kobak pont org</dc:creator>
		<pubDate>Thu, 31 Jan 2008 22:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-438169</guid>
		<description>[...] Photo Matt » Wildcard DNS and Sub Domains matt rovid leirasa a praktikus mu beallitasokrol (tags: wildcard DNS php wordpress mu settings domain) [...]</description>
		<content:encoded><![CDATA[<p>[...] Photo Matt » Wildcard DNS and Sub Domains matt rovid leirasa a praktikus mu beallitasokrol (tags: wildcard DNS php wordpress mu settings domain) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-433026</link>
		<dc:creator>George</dc:creator>
		<pubDate>Sun, 18 Nov 2007 22:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-433026</guid>
		<description>Great tutorial!</description>
		<content:encoded><![CDATA[<p>Great tutorial!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Username as Subdomain in Codeigniter at Just a Geek Sitting in The Corner</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-424857</link>
		<dc:creator>Username as Subdomain in Codeigniter at Just a Geek Sitting in The Corner</dc:creator>
		<pubDate>Wed, 22 Aug 2007 14:58:28 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-424857</guid>
		<description>[...] For wildcard DNS, take a look at this guide by Wordpress creator : http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/ [...]</description>
		<content:encoded><![CDATA[<p>[...] For wildcard DNS, take a look at this guide by WordPress creator : <a href="http://ma.tt/2003/10/10/wildcard-dns-and-sub-domains/" rel="nofollow">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-421966</link>
		<dc:creator>Corey</dc:creator>
		<pubDate>Thu, 28 Jun 2007 01:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-421966</guid>
		<description>I know this is old, but I just have to give the Lighttpd equivalent to redirect like did in your httpd.conf since I know a lot of people are making the switch.

$HTTP[&quot;host&quot;] =~ &quot;^www\.(.*)$&quot; {
     url.redirect = ( &quot;^/(.*)&quot; =&gt; &quot;http://%1/$1&quot; )
}</description>
		<content:encoded><![CDATA[<p>I know this is old, but I just have to give the Lighttpd equivalent to redirect like did in your httpd.conf since I know a lot of people are making the switch.</p>
<p>$HTTP["host"] =~ &#8220;^www\.(.*)$&#8221; {<br />
     url.redirect = ( &#8220;^/(.*)&#8221; =&gt; &#8220;http://%1/$1&#8243; )<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My daily readings 03/29/2007 &#171; Strange Kite</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-417257</link>
		<dc:creator>My daily readings 03/29/2007 &#171; Strange Kite</dc:creator>
		<pubDate>Thu, 29 Mar 2007 13:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-417257</guid>
		<description>[...] My daily readings&#160;03/29/2007  Photo Matt Â» Wildcard DNS and Sub Domains [...]</description>
		<content:encoded><![CDATA[<p>[...] My daily readings&nbsp;03/29/2007  Photo Matt Â» Wildcard DNS and Sub Domains [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trisweb.com &#187; archives &#187; New Method for Redirecting to www</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-412529</link>
		<dc:creator>trisweb.com &#187; archives &#187; New Method for Redirecting to www</dc:creator>
		<pubDate>Tue, 23 Jan 2007 18:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-412529</guid>
		<description>[...] and testing, is something I&#8217;ve never actually seen done before. I got the idea from Matt in this post about Wildcard DNS and redirecting to the non-www version of your domain. Though I&#8217;m doing the opposite, the [...]</description>
		<content:encoded><![CDATA[<p>[...] and testing, is something I&#8217;ve never actually seen done before. I got the idea from Matt in this post about Wildcard DNS and redirecting to the non-www version of your domain. Though I&#8217;m doing the opposite, the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Installing WordPress MU on a CPanel/WHM Server</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-250414</link>
		<dc:creator>Installing WordPress MU on a CPanel/WHM Server</dc:creator>
		<pubDate>Sun, 05 Nov 2006 21:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-250414</guid>
		<description>[...] If you read the readme, it recommends you to Matt&#8217;s blog where he explains how to do so. But to me, it didn&#8217;t really help, because he was giving me a bunch of code - I had a graphical web interface for my reseller admin console. [...]</description>
		<content:encoded><![CDATA[<p>[...] If you read the readme, it recommends you to Matt&#8217;s blog where he explains how to do so. But to me, it didn&#8217;t really help, because he was giving me a bunch of code &#8211; I had a graphical web interface for my reseller admin console. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-224060</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Thu, 19 Oct 2006 07:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-224060</guid>
		<description>Matt, any problems with search engines and duplicate content using your method? Seems like it could be a potential problem.</description>
		<content:encoded><![CDATA[<p>Matt, any problems with search engines and duplicate content using your method? Seems like it could be a potential problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rllq</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-186848</link>
		<dc:creator>rllq</dc:creator>
		<pubDate>Thu, 14 Sep 2006 03:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-186848</guid>
		<description>good information. it was helpful in setting up our wordpress mu (multiple user) version</description>
		<content:encoded><![CDATA[<p>good information. it was helpful in setting up our wordpress mu (multiple user) version</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shout Head :: How to setup multi-blogging with wordpress 2.0</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-111994</link>
		<dc:creator>Shout Head :: How to setup multi-blogging with wordpress 2.0</dc:creator>
		<pubDate>Sun, 18 Jun 2006 22:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-111994</guid>
		<description>[...] I am currently hosted on a dedicated server that my friend Jacwright who I worked with on www.mystickies.com has generously let me use for my own projects. Rather than have him setup a virtual directory for each subdomain I decided to use I instead setup a wildcard subdomain and using mod_rewrite I have each subdomain point to a folder in my directory. so to create a new subdomain I just create a new folder with the same name and it automatically points there. I am using the name servers at www.namecheap.com which is by far the best domain name registrar I have used.Basically the only thing I needed to do was create a C-NAME record for the wildcard * that pointed to my servers IP address.If you use your own name servers try this article on setting up wild card dns with bind. [...]</description>
		<content:encoded><![CDATA[<p>[...] I am currently hosted on a dedicated server that my friend Jacwright who I worked with on <a href="http://www.mystickies.com" rel="nofollow">http://www.mystickies.com</a> has generously let me use for my own projects. Rather than have him setup a virtual directory for each subdomain I decided to use I instead setup a wildcard subdomain and using mod_rewrite I have each subdomain point to a folder in my directory. so to create a new subdomain I just create a new folder with the same name and it automatically points there. I am using the name servers at <a href="http://www.namecheap.com" rel="nofollow">http://www.namecheap.com</a> which is by far the best domain name registrar I have used.Basically the only thing I needed to do was create a C-NAME record for the wildcard * that pointed to my servers IP address.If you use your own name servers try this article on setting up wild card dns with bind. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Whitlock</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-85576</link>
		<dc:creator>Matt Whitlock</dc:creator>
		<pubDate>Wed, 03 May 2006 21:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-85576</guid>
		<description>It&#039;s a little less overhead to do it like this:

Redirect permanent / http://photomatt.net/

That way, you don&#039;t have to involve the whole big regular expression parsing engine.  Any URL path beginning with &quot;/&quot; (that would be any URL for that virtual host at all) will be redirected to a URL beginning with http://photomatt.net/.  So the URL http://www.photomatt.net/foo/bar.html would be redirected to http://photomatt.net/foo/bar.html.</description>
		<content:encoded><![CDATA[<p>It&#8217;s a little less overhead to do it like this:</p>
<p>Redirect permanent / <a href="http://ma.tt/" rel="nofollow">http://photomatt.net/</a></p>
<p>That way, you don&#8217;t have to involve the whole big regular expression parsing engine.  Any URL path beginning with &#8220;/&#8221; (that would be any URL for that virtual host at all) will be redirected to a URL beginning with <a href="http://ma.tt/" rel="nofollow">http://photomatt.net/</a>.  So the URL <a href="http://www.photomatt.net/foo/bar.html" rel="nofollow">http://www.photomatt.net/foo/bar.html</a> would be redirected to <a href="http://ma.tt/foo/bar.html" rel="nofollow">http://photomatt.net/foo/bar.html</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iRafi.com &#187; Blog Archive &#187; Creating Wildcard Subdomains + Controller/Dispatcher</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-81547</link>
		<dc:creator>iRafi.com &#187; Blog Archive &#187; Creating Wildcard Subdomains + Controller/Dispatcher</dc:creator>
		<pubDate>Thu, 27 Apr 2006 16:47:21 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-81547</guid>
		<description>[...] Some helpful links: haalaaluu.com - Wildcard Virtual Host and htaccess Subdomain  photomatt.net - Wildcard DNS and Sub-domains [...]</description>
		<content:encoded><![CDATA[<p>[...] Some helpful links: haalaaluu.com &#8211; Wildcard Virtual Host and htaccess Subdomain  photomatt.net &#8211; Wildcard DNS and Sub-domains [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chirag</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-65746</link>
		<dc:creator>Chirag</dc:creator>
		<pubDate>Fri, 31 Mar 2006 04:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-65746</guid>
		<description>Found this page googling for &quot;apache wildcard subdomains.&quot; Works perfectly for me. Thanks!

1. I only changed the bind config (/var/named/mydomain.com.db) as you said. No changes to my Apache conf.
2. I have a server with cPanel/WHM. Restarted bind from WHM. That&#039;s all I had to do.

*.mydomain.com/file.php gets automatically forwarded to mydomain.com/file.php and the address bar still shows *.mydomain.com/file.php. Perfect!

Here&#039;s a little code for those who might be using PHP on how to get the subdomain name:

$host = str_replace(array(&quot;www.&quot;, &quot;.mydomain.com&quot;), &quot;&quot;, strtolower(trim($_SERVER[&quot;HTTP_HOST&quot;])));

if($host == &quot;mydomain.com&quot;)
  echo &quot;Welcome to My Domain.com!&quot;;
else if(strpos($host, &quot;.&quot;) === false)
  echo &quot;Dynamic subdomain: $host&quot;;
else
  echo &quot;Invalid Subdomain!&quot;</description>
		<content:encoded><![CDATA[<p>Found this page googling for &#8220;apache wildcard subdomains.&#8221; Works perfectly for me. Thanks!</p>
<p>1. I only changed the bind config (/var/named/mydomain.com.db) as you said. No changes to my Apache conf.<br />
2. I have a server with cPanel/WHM. Restarted bind from WHM. That&#8217;s all I had to do.</p>
<p>*.mydomain.com/file.php gets automatically forwarded to mydomain.com/file.php and the address bar still shows *.mydomain.com/file.php. Perfect!</p>
<p>Here&#8217;s a little code for those who might be using PHP on how to get the subdomain name:</p>
<p>$host = str_replace(array(&#8220;www.&#8221;, &#8220;.mydomain.com&#8221;), &#8220;&#8221;, strtolower(trim($_SERVER["HTTP_HOST"])));</p>
<p>if($host == &#8220;mydomain.com&#8221;)<br />
  echo &#8220;Welcome to My Domain.com!&#8221;;<br />
else if(strpos($host, &#8220;.&#8221;) === false)<br />
  echo &#8220;Dynamic subdomain: $host&#8221;;<br />
else<br />
  echo &#8220;Invalid Subdomain!&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Box</title>
		<link>http://ma.tt/2003/10/wildcard-dns-and-sub-domains/#comment-31349</link>
		<dc:creator>Box</dc:creator>
		<pubDate>Wed, 16 Nov 2005 20:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://photomatt.net/2003/10/10/wildcard-dns-and-sub-domains/#comment-31349</guid>
		<description>Hi,

for those that haven&#039;t solved the http://domain.com redirecting to cpanel page, you just have to add like this:


DocumentRoot /home/photomat/public_html
BytesLog domlogs/photomatt.net-bytes_log
User photomat
Group photomat
ServerAlias photomatt.net *.photomatt.net
ServerName www.photomatt.net
CustomLog domlogs/photomatt.net combined
RedirectMatch 301 (.*) http://photomatt.net$1


on ServerAlias just add your domain without the (*) thing and restar httpd :D done..

Thank you Matt.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>for those that haven&#8217;t solved the <a href="http://domain.com" rel="nofollow">http://domain.com</a> redirecting to cpanel page, you just have to add like this:</p>
<p>DocumentRoot /home/photomat/public_html<br />
BytesLog domlogs/photomatt.net-bytes_log<br />
User photomat<br />
Group photomat<br />
ServerAlias photomatt.net *.photomatt.net<br />
ServerName <a href="http://www.photomatt.net" rel="nofollow">http://www.photomatt.net</a><br />
CustomLog domlogs/photomatt.net combined<br />
RedirectMatch 301 (.*) <a href="http://photomatt.net$1" rel="nofollow">http://photomatt.net$1</a></p>
<p>on ServerAlias just add your domain without the (*) thing and restar httpd <img src='http://s.ma.tt/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  done..</p>
<p>Thank you Matt.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

