Update: Need help mod_rewrite and mod_proxy :(

Update: Need help mod_rewrite and mod_proxy :(

am 13.08.2002 19:33:20 von PLancashire

Well its still Apache not Microsoft Proxy server, but
getting close.

If the host, inside, the one that is being hidden has
a href that has a local reference, the proxy seems to
fail.

for example I have the file foo.html
------------------------------------------------------

This is /foo.html
click to go to bar.html


click
to go to http://inside/bar.html


click
to go to http://inside.domain.xyz/bar.html

------------------------------------------------------

The first href will get the correct reverse proxy, the
others will not, returning the hostname that is in the
href to the user.

Really hope there is a solution ...

Thanks again,

-pete

Re: Update: Need help mod_rewrite and mod_proxy :(

am 14.08.2002 09:18:45 von Graham Leggett

Lancashire, Pete wrote:

> If the host, inside, the one that is being hidden has
> a href that has a local reference, the proxy seems to
> fail.

The proxy isn't failing, your html is wrong.

> for example I have the file foo.html
> ------------------------------------------------------
>
> This is /foo.html
> click to go to bar.html
>

> click
> to go to http://inside/bar.html
>

> click
> to go to http://inside.domain.xyz/bar.html
>
> ------------------------------------------------------
>
> The first href will get the correct reverse proxy, the
> others will not, returning the hostname that is in the
> href to the user.

Correct.

Keep fully qualified website links out of your pages. Proxy does not
(and cannot) parse your HTML for you. Putting hardcoded URLs in pages
makes websites difficult to maintain anyway.

As a general rule, relative links (blah.html) will always work, and are
the most recommended. Absolute links (/dir/blah.html) will only work if
you keep your URL space the same on the front and the back (which is
good practice anyway). Hardcoded links (http://inside/dir/blah.html)
will only ever work on that server, and are unmaintainable whether you
use a proxy or not.

To my knowledge, MS Proxy server is likely to have the same problem.

Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm
"There's a moon
over Bourbon Street
tonight..."