<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 22 Nov 2008 04:42:59 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[John Rockefeller's Blog: PHP Tricks: How To Handle Multiple Domains]]></title>
      <guid>http://www.phpdeveloper.org/news/10278</guid>
      <link>http://www.phpdeveloper.org/news/10278</link>
      <description><![CDATA[<p>
<i>John Rockefeller</i> has <a href="http://www.johnrockefeller.net/?p=194">a tip</a> he'd like to share with all of the other PHP developers out there - a little method he's come up with to host multiple domains off of the same code.
</p>
<blockquote>
This is really handy for those of us who have the same code handling multiple sites or multiple sub-domains. A case in point: When I coded NetBoardz (my free forum hosting service now defunct), I had one codebase handling all 250 forums. How? Simple. When the code runs, it determines which site the user is loading and does different things (like using different databases) dynamically.
</blockquote>
<p>
He shows the two <a href="http://www.johnrockefeller.net/?p=194">key points</a> to dividing things up - grabbing the domain and subdomain they were trying to access. This can be fed into a script that can switch things like layout or even functionality based on which site they've chosen.
</p>]]></description>
      <pubDate>Tue, 27 May 2008 11:11:01 -0500</pubDate>
    </item>
  </channel>
</rss>
