Hosting Multiple Sites on IIS 5.1 and Windows XP Pro

I’m currently hosting both www.milindspandit.org and www.himalaya-capital.com on an XP Pro machine in my home office. The version of IIS that ships with Windows XP Pro is normally crippled to prevent multiple sites being hosted, but I did a kludge. When visitors come into one domain, they are directed to one sub-directory, and visitors to the other domain are directed to another. Redirection is accomplished via the following PHP code. It works great!

< ?php if (strtolower($_SERVER["HTTP_HOST"]) == "www.milindspandit.org") header("Location: http://www.milindspandit.org/MSP/"); elseif (strtolower($_SERVER["HTTP_HOST"]) == "www.himalaya-capital.com") header("Location: http://www.himalaya-capital.com/HC/"); ?>

Tags: Technical

Updated at: 29 September 2005 6:09 PM

NO COMMENTS ALLOWED