SetEnvIf troubles

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-16-2003
Brian H供
 
Posts: n/a
Default SetEnvIf troubles

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


  #2 (permalink)  
Old 08-16-2003
Michael Newton
 
Posts: n/a
Default Re: SetEnvIf troubles

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

  #3 (permalink)  
Old 08-16-2003
Brian H供
 
Posts: n/a
Default Re: SetEnvIf troubles

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?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:08 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0