views:

56

answers:

0

Hi,

I would like to forward a request in Apache, based on a request header, to a different forward proxy. I think the best would be to use mod_rewrite, but it can use only a reverse proxy defined in the same apache configuration.

I also checked the ProxyRemote property of mod_proxy but it can't be used based on conditions, only based on request url's.

I need something like:

If X-CUSTOM-HEADER is value-1 -> forward request to forward proxy p1 If X-CUSTOM-HEADER is value-2 -> forward request to forward proxy p2

etc.

Din anyone managed to make something like this?

Thanks, Alin