Forum Moderators: phranque
Alright I need some help setting this up properly.
I just opened a new network site at network.net, my main website example.com is going to be under that at my.network.net
In my WHM I have accounts for example.com and network.net and I know if I
make the subdomain in cpanel in the network.net account and move everything in
example to my.network.net it will work fine, but I want to keep the
accounts separate. In other words I want example.com to point to
my.network.net just like it was a sub domain in the same network.net account under
the directory /my/ but I don't want to move from the example.com
account. Then if you goto example.com it will redirect to my.network.net
Just to make sure were both on the same page:
Two accounts,
example.com
network.net
my.network.net would normally point to network.net/my as a subdomain
I want the two accounts to remain separate.
So my.network.net would really be pointing to and masking the
72.52.148.88/~example/ account instead of network.net/my and act like the
subdomain.
Then I could just do a normal forwards for example.com and point it
to my.network.net and it would work perfect.
Sorry im being confusing :-P
How would I do this? im open to anything really and btw this is on a VPS with full root access.
Thanks!
Generally, Cpanel generates code that goes into httpd.conf or conf.d that designates a directory such as "user/var/www/http/" as the top Web-accessible directory. Subdirectories and files for the "main" domain are placed in this directory.
If an "add-on" domain such as "my.example.com" is added to the account, then this is placed in (for example) the subdirectory, "user/var/www/http/my/".
So, if I understand the question, the simple solution is to put a symbolic link into /my/ that points back to the top-level Web-accessible directory at user/var/www/http/ and then place a 301-Moved permanently redirect into user/var/www/http/.htaccess to redirect all requests for the old domain to the addon domain. (You may also be able to add this redirect using Cpanel.)
If adding a symbolic link is not familiar to you, you might want to ask your host to do it for you.
Jim