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.

two domains to the same account

Discussion in 'General Discussion' started by amersa, Dec 25, 2006.

  1. amersa

    amersa Member

    Joined:
    Oct 14, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    hello

    please i want help.


    i have two domains , the first it was added in the server to be domain for the account customer but i want to add to the account second domain and browsing the same account either folders or files.

    for example :

    the first domain : domain1.com
    the seconde : domain2.com

    the domain1.com was created with the account and have folders colde vb and we can browsing the folder as domain1.com/vb. now i want join the domain2.com with the same account and can be browsing vb by www.domain2.com/vb.

    thanks advance
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Perhaps you want to create an Addon domain in your first account. That way one cpanel can host both domains. The addon domain files will appear as a directory under the first domain.
     
  3. amersa

    amersa Member

    Joined:
    Oct 14, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    hello jayh.

    yes i did that but the problem browsing just that folder what created for that domain. i want the second domain can browsing all folders in the account like first domain.

    best regards
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    I see. That would not be possible to do as far as I know. Perhaps someone else
    has a solution.
     
  5. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    You want to use the "Parked Domains" feature to park domain2 over domain1. This is different than the AddOn domain feature.
     
  6. amersa

    amersa Member

    Joined:
    Oct 14, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    thanks jayh38 for help

    hello Rick.

    thanks it's working now but that just direction to the domain1 but i want the possibitly of browsing all the site by domain2 without direction.
     
  7. tweakservers

    tweakservers Well-Known Member

    Joined:
    Mar 30, 2006
    Messages:
    379
    Likes Received:
    0
    Trophy Points:
    16
    you may try with iFrame on your page
     
  8. amersa

    amersa Member

    Joined:
    Oct 14, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    this not a good solution , i'm sure there are best solution
     
  9. nvez

    nvez Active Member
    PartnerNOC

    Joined:
    Jul 17, 2006
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Create as an add-on domain then put the following in a .htaccess file in the root

    RewriteEngine On
    RewriteRule ^(.*)$ http://domain1.com/$1

    I didn't have the time to check this but it should work, what it does is rewrite anything after the slash to the old domain (without redirecting) -- however, i think it would work faster like this:

    RewriteEngine On
    RewriteRule ^(.*)$ /home/domain1/public_html/$1

    That would be an internall redirect which would be faster, but again, I haven't checked.
     
Loading...

Share This Page