You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Thomas C. Meggs" <to...@plik.net> on 2002/11/19 17:29:56 UTC

[users@httpd] rewriting urls / reverse proxy

Hi,

My question is regarding a reverse proxy setup providing access to some 
internal servers.

So:

http://dmz.rproxy/internalserver0/ -> http://not.outside.accessible0/
http://dmz.rproxy/internalserver1/ -> http://not.outside.accessible1/

Pages on the not.outside.accessible[0|1] servers are returning URLs such 
as http://not.outside.accessible0/ because when the content was 
developed on the site it _was_ outside accessible, and people for 
whatever reason often use absolute URLs. (Also: If you can give me any 
examples of why using absolute URLs can be a good idea, please let me 
know. ;)

So basically, is there any way to rewrite urls coming back out from the 
reverse proxy to the client? So if the not.outside.accessible0 server 
sends back an HTML document containing a link to its not accessible 
address, it will be changed to http://dmz.rproxy/internalserver$1/?

So, any suggestions? What is the best way to deal with this? Thanks!

Regards,
Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] rewriting urls / reverse proxy

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 19 Nov 2002, Thomas C. Meggs wrote:
> So basically, is there any way to rewrite urls coming back out from the
> reverse proxy to the client? So if the not.outside.accessible0 server
> sends back an HTML document containing a link to its not accessible
> address, it will be changed to http://dmz.rproxy/internalserver$1/?

There is no way to do this with the base Apache.  (Well, I suppose it
might be possible with mod_ext_filter+sed, but I wouldn't recommend it.)

Given Apache 2's new filter infrastructure, it should be relatively easy
to write a module that does this.  But I don't know of any presently in
existence.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org