Two urls, one server


#1

Hi. I have two domains registered and I want to point one of them to a directory under the first domain. The first domain has a hosting plan on it, while the second does not. How can I point the second to aim at a subdirectory of the first domain?


#2

Your use of the word “pointing” is ambiguous.

When adding a domain or subdomain as fully hosted, you get to specify what DH calls the Web directory or what the Apache documentation calls the document root. This is the directory where Apache starts looking for files to serve from.

You can certainly add both domains and specify the Web directories as you see fit, for example you can specify /home/username/domain-a.com/ and for domain A and then specify /home/username/domain-a.com/subdir/ for domain B; this would make http://domain-a.com/subdir/ and http://domain-b.com/ bring up the exact same files.

There is also the ability to have Apache issue a redirect, which is the term for telling the web browser to ask for a different URL - thus the visitor sees the browser location bar change from http://domain-b.com/ to http://domain-a.com/subdir/

Customer since 2000 :cool: openvein.org