Forum Moderators: phranque
to redirect to:
sub.domain2.com
This isn't a problem. I need the sub.domain2.com to be appear to be sub.domain1.com.
So if you type in sub.domain1.com/dir/home/
it should actually go to sub.domain2.com/dir/home/ and still retain
sub.domain1.com/dir/home in the URL bar at the top.
I can't find how to do this anywhere on google. I know you can do it with 1 domain and different directories, but I don't know if I can do it accross domains themselves.
If this isn't the best way to go about this, how can I do it without using frames or something lame like that?
Thanks
-Terry
Welcome to WebmasterWorld!
The critical question here is whether the subdomain and the target domain reside on the same server. If so, then you can either configure httpd.conf to 'steer' the subdomain requests to a different filespace, or do a rewrite in httpd.conf or in .htaccess. You cannot use any kind of redirect, because that involves the client and will force an update of the client browser's address bar and make search engines aware of the URL change.
If not. then you will have to set up the subdomain as a proxy server for the domain. What this means is that all traffic for domain must pass through subdomain to domain, and all responses from domain must then pass back through subdomain. So subdomain's workload in the request and response handling phase increases, while it sees no increase in the content-handling phase. Another downside is that domain will always see subdomain as the requesting IP address, so tracking and logging for domain needs to remain on subdomain unless you modify the tracking and logging software to examine the "HTTP_FORWARDED_FOR" HTTP header.
So we need to know where subdomain and domain are hosted, and whether you have access to the httpd.conf serve config file on subdomain.
Jim
The Apache Virtual Hosts documentation [httpd.apache.org] may also be helpful.
Jim