rewriting URL in 301/302 response

From: Kazuto Tominaga <>
Date: Fri, 09 Jan 1998 01:24:55 +0900


Is it possible for squid to rewrite URL at the "Location:" field in
"301 Moved Permanently" or "302 Moved Temporarily" response from web

My site has firewall, and I am using squid as an accelerator at the
border of my site. Squid receives requests from clients outside,
and forwards them to web servers inside the site. Because there are
several web servers inside, I use a redirector to demultiplex
requests by rewriting URL like this: -> ->

A problem occurs when a web server inside the site returns "301
Moved Permanently" code. For example, accessing squid by URL

then the redirector rewrites it into

and the web server ( returns

  301 Moved Permanently

then squid returns this message to the web client. The client will
try to access the page with URL

but the machine is inside the firewall, so the page
cannot be accessed from outside the site with this URL.

So I thought it will go well if squid has facility to rewrite URL at
Location: field, say rewriting the URL


back to


by a (reverse) redirector or anything.

So questions:

 1. Does squid has this facility? Then how can I use it?
 2. Or is there any other good way to avoid this problem?

Thanks in advance.


 -- Kazuto Tominaga (
Received on Thu Jan 08 1998 - 08:26:57 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:21 MST