[squid-users] Redirect depending on http status code

From: Leonardo M. Ramé <l.rame_at_griensu.com>
Date: Wed, 9 Mar 2011 14:49:12 -0300

Hi, I'm new to Squid and have a problem I think could be solved by the
proxy.

I have to Apache servers, Server "A" is on a local network, and Server
"B" is in a remote place accessible by Internet. Both servers are running a CGI script that
serves documents when called like "/mycgi?DocID=1234".

Server "A" has only new documents, say maximum two weeks old, and Server
"B" has all documents, new and old.

I would like to know, if through Squid, I can do this:

1) The user asks for a document using http://<SERVER-A>/mycgi?DocID=1234
2) Squid redirects the request to the Apache server running on the local
network.
3a) If the document is found, then Squid simply return it to the caller.
3b) If the document is not found, then Squid redirects the request to
Server B (remote), and Apache in Server B returns the document to Squid,
and it to the client caller.

Can Squid solve this kind of problems? does anyone knows an Open Source
solution?

Thanks in advance,

-- 
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54(351)5394365
Received on Wed Mar 09 2011 - 17:49:24 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 10 2011 - 12:00:02 MST