Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder levani's Avatar
    Join Date
    Mar 2009
    Location
    Georgia
    Posts
    183
    Thanks
    29
    Thanked 1 Time in 1 Post

    Multiple domains for one site with different logos

    How can I make one site accessible with multiple domain names with different logos for each domain name? For example I have a site on domain A and want to make it accessible on domain B and C. When someone types domain B or domain C everything should be same as on domain A but the logo. These sites should use one database and one script!

    The only thing that came in my mind is to create one big iframe for other domain with site A inside it and detect whether it's domain B or C using php referer...

    Do you happen to know any better methods?

    Thanks in advance

  • #2
    New Coder
    Join Date
    Feb 2010
    Posts
    29
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Make an index.php script, that will know what domain is currently accessed
    Code:
    $currentSite = $_SERVER["SERVER_NAME"] ;
    and using that , assemble the site in a different way (for example, include different header, but the rest is the same)

  • #3
    New to the CF scene
    Join Date
    Feb 2010
    Location
    Texas
    Posts
    8
    Thanks
    0
    Thanked 3 Times in 3 Posts
    $_SERVER[HTTP_HOST] also works.
    Fan of: Dialogs CMS, JQuery, Coda, MySQL, phpMyAdmin, CentOS, CPanel


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •