Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.