Forum Moderators: phranque

Message Too Old, No Replies

Redirecting and domain masking

.htaccess redirecting and domain masking

         

anthemZ

6:19 am on Mar 27, 2006 (gmt 0)

10+ Year Member



Hi,

Can somebody please help me and show me how i can redirect a subdomain to another domain but have URL masked in the address bar. My only options are to do this in the .htaccess. I have no clue of how to do this?

eg. [subdomain.somedomain.com...]

should be forwared to: [anotherdomain.com...]

AND the address bar in the browser should be masked so that it displays the forwarded url (http://www.anotherdomain.com/)

Please HELP.....

jdMorgan

2:27 pm on Mar 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You cannot redirect without changing the address bar -- Changing the address bar is a normal and direct result of any redirect.

However, you could proxy the request through the first server to the second server and then pass the response back through the first server to the client.

Downsides are reduced performance and the fact that logs and stats on the second server will always show the first server as the requestor. In other words, you have to do tracking and logging on the first server only, unless you modify the log format on the second server to use X_HTTP_FORWARED_FOR to get the actual requestor's IP address.

Jim

anthemZ

11:38 pm on Mar 27, 2006 (gmt 0)

10+ Year Member



ooppps...sorry, i meant to say...

eg. [subdomain.somedomain.com...]

should be forwared to: [anotherdomain.com...]

AND the address bar in the browser should be masked so that it displays the origanl url NOT the fowarded url. ie. it should be masked to [subdomain.somedomain.com...]

jdMorgan

12:20 am on Mar 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to set up a proxy server, then.

Jim