The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

csr want subdomains/pointers to use same PHP script

Discussion in 'General Discussion' started by asmithjr, Jul 30, 2004.

  1. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    I have a customer with 26 domain names, he wants to have the doamins point to a subdomain once the user enters the domain name.

    Here is the catch. his main domain is running PHP scripts and each subdomain/domain of the 26 are schools. We need to;

    When user types in a domain name that is not the master domain he actually needs to run the maindomain.com/script.php?ID=### but make the url show the subdomain.

    maindomain.com

    anotherdomain.com will redirect to sub.maindomain.com but run the php script maindomain.com/script.php?ID=###
     
  2. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    I put something like this in my index.php
    <?
    $URL = $HTTP_HOST;
    if ($URL != maindomain.com')
    header("Location: http://sub.maindomain.com/script.php?TeamID=0005");
    ?>

    This works but it puts script.php?ID=0005 in the URL also.

    Any way to hide the script.php?ID=0005
     
Loading...

Share This Page