SetEnvIf not working (?)

Hi all,

I need some kind of ID in the apache log associated with some URIs. Something like this:

/other/uri/… -

So I tried to resolve this problem with SetEnvIf:

LogFormat “%h %l %u %t \”%r\" %>s %b \“%{Referer}i\” \“%{User-Agent}i\” \“%{__utma}C\” \“%{id}e\”" combined_2
SetEnvIf Request_URI “/some/uri1/” id=some1
SetEnvIf Request_URI “/some/uri2/” id=some2
CustomLog access_log combined_2

The problem is, there is always the “-” in the log…

It is something wrong with this solution? Or the .conf part is buggy?

Thank you in advance.


SetEnvIf not working but resolved with other solution:

RewriteRule ^some/uri(1-9)/$ [CO=__s:s$1:domain]


LogFormat “%h %l %u %t \”%r\" %>s %b \“%{Referer}i\”
\“%{User-Agent}i\” \“%{__utma}C\” \“%{__s}C\”" combined_2

Thank you,