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

Re[3]: [cobalt-users] Domain Parking - Off Topic



>>> Does anyone know how when you park a domain on an IP and someone goes to
>>> that page by the url that it displays the page dynamically showing the url
>>> you typed i.e. you create one page with a <domain.com> tag and when called
>>> it displays the url type in.

fin>> This can be done trivially using server incluses (eg index.shtml)

fin>>  Welcome to <!--#echo var="SERVER_NAME" -->

fin>> (plus the appropriate <html>...

fin>> note that if someone access the domain by IP number that's what they will
fin>> see however...the server hasn't a clue...

BC> If you have PHP4 installed, this is also another, much shorter, way to
BC> do it:

BC> <?= $HTTP_HOST ?>

NOTE:

Forgot to mention...  If your using a NameVirtualHost with many
domains parked on a single IP, then you want the "HTTP_HOST" value.
"SERVER_NAME" will only return the first declared NVH VHOST entry in
your httpd config file.


-- 
Best regards,
 Brian Curtis