Jonas Nordström ([EMAIL PROTECTED]) said something to this effect:
> But doesn't that only pass on the request and then return the HTML-files
> unchanged? I also want to change the links inside the HTML-bodies on the
> fly, so that the users can continue to "surf the intranet". For example, if
> the HTML contains "<A HREF="path/my_file.html">" I want to change that to 
> "<A HREF="https://gateway_server/intranet_host/path/myfile.html>"
> 
> /Jonas

Hi Jonas,

ProxyPass does *not* modify the contents of the file (in fact, the docs say
that it might not be all that useful for exactly this reason). The thing is,
though, that the links, if relative, will be relative to the current page,
wherever that current page is. If your links are all in the form
<a href="../foo.html"> and <a href="./bar/baz.html"> then all links will
work just fine (this is a good idea anyway, although difficult to do
consistently).

Assuming that you don't want to rewrite the pages on your intranet to fix
all your links (which is the point of this whole thing, I would assume), then
the best way to do it, I would say, would be write a translation handler that
would use LWP to fetch the document from the intranet server (possibly with
some caching), pass it through a regex that fixes the links (i.e., preface all
links with 'http://gateway_server/intranet_host/' unless they begin with http),
and then send it to the browser. This is similar to the proxy module that is
described in Chapter 7 of the Eagle book (p 374-381, or
http://www.modperl.com/book/chapters/ch7.html).

Hope this helps.

darren

-- 
Friends help you move. Real friends help you move bodies.

Reply via email to