page custom to url
Posted: Tue Oct 15, 2002 12:19 pm
say you have two domains pointing to the same index.php page - is it possible to detect which domain the user is loading and display the homepage customized for each domain? examples?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
if ($_SERVERї"HTTP_HOST"] == "www.abc.com")
{
//Display content for abc.com
}
elseif ($_SERVERї"HTTP_HOST"] == "www.xyz.com")
{
//Display content for xyz.com
}
?>