Forum Moderators: phranque

Message Too Old, No Replies

Masking URL for Another Domain

masking url for another domain

         

sgtaw

5:18 pm on Jan 18, 2008 (gmt 0)

10+ Year Member



Hi all,

I tried to search on this but I'm not even sure what to search!

I have a domain called (http://ABC.com). It is hosted by hostingA

I have a blog on a subdomain (http://blog.XYZ.com) It is hosted by hostingZ

I have [blog.ABC.com...] forwarded to [blog.XYZ.com...] . I did this by adding the CNAME "blog.XYZ.com." (without quotes and with trailing .) to ABC.com

So far everything works.

Here the problem. When I go to [blog.ABC.com...] it NOW displays [blog.XYZ.com...]

I WANT it to display [blog.ABC.com...] so that it is seen as part of ABC.com NOT XYZ.com

Does that make sense?

More importantly, how is it done?

Thanks in advance,

Ed

jdMorgan

8:26 pm on Jan 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to proxy requests through the ABC server to the YXZ server to make this work.

Pluses:

  • "ABC" remains in the address bar.

    Minuses:
  • All requests for XYZ will pass through ABC. ABC will see both the connection-related load for XYZ, as well as an additional load to establish connections with XYZ.
  • XYZ will see all connections as originating at ABC, unless you set up "forwarded-for" headers on the proxy connection, and use custom log formatting on XYZ.
  • It is not a simple configuration, so should not be used unless actually required for server performance reasons.

    Bottom line is that it would be far simpler to upgrade the ABC server to handle the blog traffic as well, unless you've already got a top-of-the line dedicated server and it can't keep up with the traffic to both domains.

    Alternately, consider putting the blog on a subdomain of ABC, i.e. blog.abc.com. A simple DNS "A record" can then point requests for the subdomain to a different server (using its IP address).

    If you wish to use a proxy, see Apache mod_proxy for reverse-proxy setup, or mod_rewrite for the proxy throughput option on RewriteRule.

    Jim

    [edited by: jdMorgan at 8:28 pm (utc) on Jan. 18, 2008]

  •