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.

Automatically creating a subdomain with CPanel, without logging into CPanel

Discussion in 'General Discussion' started by avandam, Jun 13, 2005.

  1. avandam

    avandam Registered

    Joined:
    Jun 13, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
    Good morning,

    My hosting provider uses CPanel to help me manage my domain. They do not provide SSH or anything like that and I have to login to CPanel to create sub domains.

    A client of mine wishes to create a new sub domain every time they create a new section on their website. We have developed a content management system for them which allow them to create the new section and add all the information for that section. This then sends me an email telling me to create the appropriate sub domain.

    I want to automate this process. Basically when they create the new section I want to use a PHP script to tell CPanel to create the new sub domain and redirect it to the correct page.

    For example: They create a new section called support which requires a sub domain like support.mydomain.com. The actual page called is something like index.php?section=23. I now want to tell CPanel to create a sub domain called support.mydomain.com and redirect all requests to http://www.mydomain.com/index.php?section=23.

    I have done a bit of Googling, with possibly the wrong search terms, which didn't bring any clarity.

    It will be much appreciated if you could provide me with some additional information and/or pointers on how to get this going.

    Thanks in advance

    Albert
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You should do a search on the forums first as this has been answered many times before. Try automatic subdomain
     
  3. avandam

    avandam Registered

    Joined:
    Jun 13, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
Loading...

Share This Page