This is a discussion on SetEnvIf troubles within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm trying to avoid having to create single line entries in my config for files that I don't ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm trying to avoid having to create single line entries in my config for files
that I don't want to log, but I'm having a bit of trouble getting there. If I use this entry below, it gets ignored and all the files in that folder get logged SetEnvIf Request_URI "/emoticons/*.gif" dontlog SetEnvIf Request_URI "/emoticons/*.jpg" dontlog If I use this entry, no hits to the folder show in the log at all (I wish to see a hit to the folder, but not the served files) SetEnvIf Request_URI "/emoticons/*" dontlog I wish to avoid having to use lots of entries with the following format SetEnvIf Request_URI "/thisname.gif" dontlog I'm sure I'm missing something very simple, so could someone throw a little extra light on it for me please. TIA |
|
|||
|
Brian H供 wrote:
> I'm trying to avoid having to create single line entries in my config for files > that I don't want to log, but I'm having a bit of trouble getting there. > > If I use this entry below, it gets ignored and all the files in that folder get > logged > SetEnvIf Request_URI "/emoticons/*.gif" dontlog > SetEnvIf Request_URI "/emoticons/*.jpg" dontlog > > If I use this entry, no hits to the folder show in the log at all (I wish to see > a hit to the folder, but not the served files) > SetEnvIf Request_URI "/emoticons/*" dontlog > > I wish to avoid having to use lots of entries with the following format > SetEnvIf Request_URI "/thisname.gif" dontlog > > I'm sure I'm missing something very simple, so could someone throw a little > extra light on it for me please. > > TIA > > you're working with a regexp, not a string search. you need to escape special characters with a backslash. ---- Michael Newton http://mike.rancidcrab.com |
|
|||
|
Michael Newton said:
> Brian H供 wrote: >> I'm trying to avoid having to create single line entries in my config for >> files that I don't want to log, but I'm having a bit of trouble getting >> there. >> >> If I use this entry below, it gets ignored and all the files in that folder >> get logged >> SetEnvIf Request_URI "/emoticons/*.gif" dontlog >> SetEnvIf Request_URI "/emoticons/*.jpg" dontlog >> >> If I use this entry, no hits to the folder show in the log at all (I wish to >> see a hit to the folder, but not the served files) >> SetEnvIf Request_URI "/emoticons/*" dontlog >> >> I wish to avoid having to use lots of entries with the following format >> SetEnvIf Request_URI "/thisname.gif" dontlog >> >> I'm sure I'm missing something very simple, so could someone throw a little >> extra light on it for me please. >> >> TIA >> >> > > you're working with a regexp, not a string search. you need to escape special > characters with a backslash. > I appreciate that, I even tried SetEnvIf Request_URI "/emoticons/*\.gif" dontlog but that didn't want to know either, have you got a slightly bigger clue please? |