Let’s say I started out with one domain on a server called “www.oldsite.com”. Then I decided to register another domain,”www.newsite.com” and put the new domain’s files into the directory, “www.oldsite.com/newsite/”. How do I allow the user to visit “www.newsite.com” and access the pages of the new site.
Share
You’re looking for host header redirection. This is configured differently for each web server, but the concept is the same. When the HTTP request comes in, the web server checks the host name, and redirects to the correct application accordingly.
Host Headers in IIS7:
http://technet.microsoft.com/en-us/library/cc753195%28WS.10%29.aspx
Virtual Hosts in Apache:
http://httpd.apache.org/docs/2.0/vhosts/name-based.html