Forum Moderators: phranque

Message Too Old, No Replies

Redirect and mask URL

How should I go about to do this?

         

Aaron01

7:19 pm on Jun 5, 2004 (gmt 0)

10+ Year Member



I have an apache webserver hosted on my machine which example.co.uk points to. Additionally I have 100mb of ISP webspace at [homepages.hosting_co.co.uk...] (ugly long URL)

What rewrite rules should I use in .htaccess to do the following:

[hosting_co.example.co.uk...] redirects to [homepages.hosting_co.co.uk...] but force [hosting_co.example.co.uk...] to stay in the address bar? Same goes for something like [hosting_co.example.co.uk...]

My current rewrite rules for redirection works, but the homepages.hosting_co link appears in the address bar afterwards, which I want to avoid.

TIA :)

[edited by: jdMorgan at 7:34 pm (utc) on June 5, 2004]
[edit reason] Obscured specifics per TOS [/edit]

jdMorgan

7:40 pm on Jun 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Aaron01,

Welcome to WebmasterWorld [webmasterworld.com]!

> but the homepages.hosting_co link appears in the address bar afterwards, which I want to avoid.

This cannot be avoided when doing an external redirect, which is required to reach an external host.

I'd suggest you re-configure your machine to add Apache mod_proxy, and look into using the ProxyPass directive to accomplsh your goal. Your machine would then serve as a proxy for the external hosting space. (This is not very efficient, but it's the only way to hide the domain change.)

Jim

Aaron01

9:11 pm on Jun 5, 2004 (gmt 0)

10+ Year Member



I see...

By being a proxy, would the bandwidth from the ISP webspace go through my machine to the visitor? I wouldn't have enough adsl bandwidth to do that

thanks

jdMorgan

9:26 pm on Jun 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> By being a proxy, would the bandwidth from the ISP webspace go through my machine to the visitor?

Yes, your machine would issue the request to the ISP server, recevie the response, and send it back to the requestor.

Jim

Aaron01

9:29 pm on Jun 5, 2004 (gmt 0)

10+ Year Member



Ah well, I suppose I shouldn't bother with the proxypass mod. Was planning on using the webspace for digiphotos and such that my ADSL line wouldn't have enough speed for.

Thanks for your help though!