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.

Many Subdomains

Discussion in 'General Discussion' started by natong, Sep 18, 2009.

  1. natong

    natong Well-Known Member

    Joined:
    May 17, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    I have many subdomains.

    ex:

    subA.domain1.com = subA.domain2.com
    subB.domain1.com = subB.domain2.com
    subC.domain1.com = subC.domain2.com


    After parked the 2nd domain name, do I need to add subdomains one by one ?
    It doesn't delete all of my files in sub folder, right ?
     
    #1 natong, Sep 18, 2009
    Last edited: Sep 18, 2009
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are all these subdomains pointing to the same content, or all serving different content?

    Removing a subdomain only removes files if the checkbox for that is checked when removing a subdomain.


    ** Split thread into its own topic as it was unrelated to the original topic **
     
  3. natong

    natong Well-Known Member

    Joined:
    May 17, 2008
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Yes, I want

    "domain1.com" same content with "domain2.com"

    "www.domain1.com" same content with "www.domain2.com"

    "subA.domain1.com" same content with "subA.domain2.com"

    "subB.domain1.com" same content with "subB.domain2.com"

    "subC.domain1.com" same content with "subC.domain2.com"
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Assuming subA, subB and subC are all presenting different content then there is no method in WHM nor cPanel to automatically set this up.

    One way to achieve the desired functionality is to create subA.domain1.com then redirect it to subA.domain2.com and so forth.

    If you wanted all the subdomains of domain1.com to point to the same content, you would just create *.domain1.com and point that to your desired content.

    If you are familiar with web scripting, you could probably build a script that looks at the URL being accessed and redirects the user accordingly. Then have *.domain1.com serve that script (if it is named index.cgi, index.php or similar).
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Another method would be to park your secondary domain on top of the first and then use Mod_ReWrite directives in .htaccess to parse your secondary domain requests to their respective primary domain sites.
     
Loading...

Share This Page