views:

160

answers:

1

For example:

www.example.com and subdomain.mydomain.com are on the same server.

When I put example.com in the address bar, I want it to serve the pages from subdomain.mydomain.com, but still show as example.com in the browser. So, if the old URL was:

subdomain.mydomain.com/this/stuff?is_cool=yes

the new url would be

www.example.com/this/stuff?is_cool=yes

A: 

You've got a couple options.

  • Write a proxy on example.com that fetches the content from subdomain.mydomain.com and displays it to the user.
  • As both sites are on the same server, point example.com's document root to the same spot as subdomain.mydomain.com.
  • Use a frameset on example.com with a 100% height frame of subdomain.mydomain.com.
ceejayoz