two domains to the same account

amersa

Member
Oct 14, 2006
8
0
151
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
 

jayh38

Well-Known Member
Mar 3, 2006
1,213
0
166
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.
 

amersa

Member
Oct 14, 2006
8
0
151
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.
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
 

jayh38

Well-Known Member
Mar 3, 2006
1,213
0
166
I see. That would not be possible to do as far as I know. Perhaps someone else
has a solution.
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
You want to use the "Parked Domains" feature to park domain2 over domain1. This is different than the AddOn domain feature.
 

amersa

Member
Oct 14, 2006
8
0
151
I see. That would not be possible to do as far as I know. Perhaps someone else
has a solution.
thanks jayh38 for help

You want to use the "Parked Domains" feature to park domain2 over domain1. This is different than the AddOn domain feature.
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.
 

tweakservers

Well-Known Member
Mar 30, 2006
379
0
166
you may try with iFrame on your page
 

nvez

Active Member
PartnerNOC
Jul 17, 2006
40
0
156
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.