[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Best way to forward domain?



On Wed, 16 Feb 2000 12:16:12 -0800, Jeff Lasman wrote:

>Of course with a database, HTML4, and the latest http, you could probably 
>send everything to one IP, parse the URL out of the http headers, then look 
>up the URL in a database, and use a PHP script to do something like I'm 
>doing, but on the fly.

That is exactly how to do it - set up a single file (e.g. index.php3) which
is also set to be the 404 page. When the request arrives, $HTTP_HOST will
have the name of the server the user requested.  At that point you could get
as fancy as you want looking up the URL (e.g. multiple hostnames in domain,
default for domain, etc) and finally do a Header("Location:
$URL_for_domain").