Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote .htaccess in file dir/subdir to don't log URI requests in this particular directory. The .htaccess is actually executed by apache (if i write deny from , it works), but if the file contains only this rule:

   SetEnvIf Request_URI "^dir/subdir" dontlog

Don't work. AllowOverride All and mod_rewrite are enabled. What can be the problem?

Sorry for my bad english.

share|improve this question
up vote 2 down vote accepted

You should have this in your htaccess :

SetEnvIf Request_URI "^/dir/subdir(.*)$" dontlog

And something like this is you apache config :

CustomLog /var/log/apache2/access.log combined env=!dontlog
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.