I have a MediaWiki installation, which returns a 404 error to the client when they request a page that doesn't exist yet. This is correct/desired behaviour, however it is also expected behaviour, so I don't want to log these errors to the log file. Examples of these logs are:
Code:
/index.php/ArchServer_Wiki:Current_events: 2 Time(s)
/index.php/ArchServer_Wiki:General_disclaimer: 1 Time(s)
These "false positives" make it difficult to find genuine 404 errors that need attention when reviewing the logs.
I can use SetEnvIf to create a rule like:
Code:
SetEnvIf Request_URI "^/index\.php/.*$" dontlog
CustomLog "/var/log/httpd/wiki-access_log" combined env=!dontlog
But this will prevent ALL logging, which then screws up my statistics for pages that do exist. I can't see anyway to test the HTTP Status Code using SetEnvIf.