Forum Moderators: buckworks & webwork

Message Too Old, No Replies

two domains, one hosting space

         

tambre

12:49 am on Dec 9, 2004 (gmt 0)

10+ Year Member



hullo,

i have two domains using the same space. now, i was wondering if i could get a different layout to appear depending upon what domain they went too. example: www.domain1.com has one index page and www.domain2.com has a totally different index page.

i wasn't sure if i could do that because both domains are sharing the same space.

-tambre

thanks in advance for any replies i might get.

jo1ene

1:33 am on Dec 9, 2004 (gmt 0)

10+ Year Member



You can have each one resolve to different index pages but you may have to pay for two accounts with your hosting company. My advise is call the host and ask them.

Jaydee

3:33 pm on Dec 9, 2004 (gmt 0)



I'm not a programmer but I think the flwg can be done:
- add both domain names into the httpd.conf file of your webserver or in an htaccess file if you're on shared hosting (some server admin panels allow you to do the exact same thing)
- I think there is a function in PHP that can detect a domain name so if it detects domain1.com it will show content 1 and if it detects domain2.com it will show content 2. The beauty is it's still just one (1) file (index.php) but you have to know PHP.

Again, I'm not a programmer so I'm not 100% sure but I think this should work!

encyclo

3:51 pm on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], tambre.

Most hosting companies can allow you to host two different sites within one space for a small extra fee - often much less than a second hosting account. You should check with their sales department to see what they offer, and if necessary shop around to compare offers from other hosting companies.

tambre

4:45 pm on Dec 9, 2004 (gmt 0)

10+ Year Member



thanks for all your help guys! and thank you for the welcome encyclo. :)