Mobile app version of vmapp.org
Login or Join
Caterina187

: Can I point a domain to a specific folder in the host? let's assume I have two domains (one already set) and one host. I want to the second domain point to a specific folder in the host

@Caterina187

Posted in: #Domains

let's assume I have two domains (one already set) and one host. I want to the second domain point to a specific folder in the host so that when you access domain2.com it points to host/myfolder so domain2.com/foo.php will be same as host/myfolder/foo.php. I hope it's clean. Is this possible?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

1 Comments

Sorted by latest first Latest Oldest Best

 

@Smith883

If you if you are using cpanel, it is trivial to do this. Add the new domain as an addon domain and then point the document root to your new location.

Too avoid confusion, I strongly recommend that you make the directory of your new domain /host/domain2.com so that if you add yet another domain you won't end up with a mess of confusing names.

A note of trivia: While your domain2.com/foo.php will work, so will domain1.com/domain2.com/foo.php as the second domain's folder will be sitting in the first domain's document root (assuming that is /home/user/public_html - which is the default)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme