httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kogelheide, Ryan SSBC:EX" <>
Subject [users@httpd] SetEnvIf and mod_rewrite
Date Fri, 03 Jun 2011 21:45:26 GMT
Hi everyone,

I need your help. I've been trying to check a header variable provided by top-level filter
and proxy depending on it:


  RewriteCond %{ENV:AUTHENTICATED} 1
  RewriteRule ^/(.*) https://backend:7792/authenticated/$1 [P,L]
  ProxyPassReverse / https:// backend:7792/authenticated/

  RewriteCond %{ENV:AUTHENTICATED} !1
  RewriteRule ^/(.*) https:// backend:7792/unauthenticated/$1 [P,L]
  ProxyPassReverse / https:// backend:7792/unauthenticated/

But it's like mod_rewrite can't see the variable (in the rewrite log):

applying pattern '^/(.*)' to uri '/'
RewriteCond: input='' pattern='1' => not-matched
applying pattern '^/(.*)' to uri '/'
RewriteCond: input='' pattern='!1' => matched

I saw one post

that said that sometimes variables aren't visible, but I don't really understand why. I think
I'm missing something fundamental about how the httpd works.

I'm using Apache 2.0.64 and the directives are in a virtual host.



View raw message