Forum Moderators: coopster

Message Too Old, No Replies

Change Content based on Domain used

Parked Domains share same directory structure

         

00Kell

10:51 am on Mar 23, 2004 (gmt 0)

10+ Year Member



Hi Everyone,

My hosting package allows me to park multiple domains at no extra cost. Each parked domain points to the default domain and therefore appears identical to it.

Is it possible to change the content of my index page based on the URL used to access it?

e.g. parked-domain.com uses same index page as default.com but appears as parked-domain.com

Can a different page be displayed for parked-domain.com?

Kelly

jatar_k

5:59 pm on Mar 23, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld 00Kell,

You could always have it serve different content based on domain.

if ($_SERVER['HTTP_HOST'] == "www.example.com") include "somepage.php";
else include "otherpage.php";

00Kell

7:46 pm on Mar 23, 2004 (gmt 0)

10+ Year Member



Thank you very much jatar_k!

That is exactly what I was looking for. It works a treat! :-)

I new it was something simple like that. I just couldn't find $_SERVER['HTTP_HOST'] anywhere.

Thanks Again!