Same Site with two different domains

Discussion in 'Site & Server Administration' started by HeRBaR, May 16, 2011.

  1. #1
    Hello,
    I have to different domains that I'm pointing to the same host.
    Till here everything is ok, but i want to do smth else and I'm not figuring it out.
    Lets say that i have www.domain1.com and www.domain2.com
    I want to do that when a user enters www.domain1.com the logo of the site to be DOMAIN1 logo and the template1 (THEME)
    and when another user enter www.domain2.com the logo and the template of the site to be different from the www.domain1.com

    There are many sites out there that are build like this, anyone have any idea how can i do this too. If yes, can i do this with CMS's like Wordpress, Joomla or Drupal...

    Thnx in advance...
     
    HeRBaR, May 16, 2011 IP
  2. JMDomains

    JMDomains Well-Known Member

    Messages:
    775
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    175
    #2
    Copy the site and create a new directory, then point domain2 to this new directory. Then just make the neccessary changes.

    Thats only if theres no database involved.
     
    JMDomains, May 17, 2011 IP
  3. HeRBaR

    HeRBaR Well-Known Member

    Messages:
    103
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    No, it will be database involved. beside this it will be involved even comments.
    So when a user comments on site1 this comment will show even in site2
    Thx for ur reply.
     
    HeRBaR, May 17, 2011 IP
  4. JMDomains

    JMDomains Well-Known Member

    Messages:
    775
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    175
    #4
    Then the only other way I can see it being done is with custom php coding to pull content from both.
     
    JMDomains, May 17, 2011 IP
  5. ntomsheck

    ntomsheck Peon

    Messages:
    87
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yeah, a simple if($_SERVER['SERVER_NAME'] == "www.domain2.com") {
    $image = "image2.png"
    } else {
    $image = "image1.png"
    } would do you justice.

    You can interpolate the extra data as necessary. PHP is your friend :)
     
    ntomsheck, May 17, 2011 IP