httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dani Pardo" <>
Subject [users@httpd] mod_proxy not handling redirects correctly
Date Thu, 24 Jan 2008 14:05:12 GMT
 Hi all, I have an environment in which I reverse proxy some servers
depending on the value of a cookie, that is:

        RewriteCond %{HTTP_COOKIE} ^.*destination_host=host1.*$
        RewriteRule (.+)$1 [P]
        RewriteCond %{HTTP_COOKIE} ^.*destination_host=host2.*$
        RewriteRule (.+)$1 [P]

 The idea is that I reverse proxy everything to either
or depending on the value of the cookie
 That's working correctly at the moment, the problem comes when the
target (host1 or host2) sends a redirect, which doesn't get reverse
proxied, and thus the browser goes directly to or
  I could add

        ProxyPassReverse /

 Which will adapt the response of the redirect, but I need this rule
to depend also on the value of the cookie "destination_host".
 The question is, is there any way to ProxyPassReverse depending on
the value of a cookie? Or should it be done automatically by
mod_rewrite with [P]? If so, is it a bug, or am I just doing something

  Any clue appreciated,


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message