Just a correction: In the first example, I mistakenly wrote foo in the SetEnvIf statement, it is: SetEnvIf QUERY_STRING baz var=bar
On Wed, Jul 27, 2016 at 6:47 PM, Mohit Chawla <mohit.chawla.bin...@gmail.com > wrote: > Hi, > > I am trying to use SetEnvIf with QUERY_STRING, but can't get it to work. > This is being done inside the mod_deflate module block like: > > <IfModule mod_deflate.c> > SetEnvIf QUERY_STRING foo var=bar > LogFormat '"%q" "%{var}e"' > </IfModule> > > ...with a request like curl localhost?baz, the log has: > "?baz" "-" > > Other variables like REQUEST_METHOD work fine: > <IfModule mod_deflate.c> > SetEnvIf REQUEST_METHOD GET var=bar > LogFormat '"%q" "%{var}e"' > </IfModule> > $ curl localhost?baz > "?baz" "bar" > > Apache version is 2.2.22 on Ubuntu 12.04. > > Any ideas how to debug or fix this ? > > Thanks, > Mohit >