I have the following in my httpd.conf file, in order to exclude the url from being logged as it is a status checker:
SetEnvIf Request_URI "^/status_check.php$" dontlog=1
CustomLog "logs/access_log" combined env=!dontlog
However this is not stopping the status_check URL being logged. I have also tried various variants including:
SetEnvIf Request_URI "^/status_check\.php$" dontlog=1
SetEnvIf Request_URI "^/status_check\.php" dontlog=1
SetEnvIf Request_URI "/status_check\.php" dontlog=1
SetEnvIf Request_URI "/status_check.php" dontlog=1
SetEnvIf Request_URI "/^status_check.php" dontlog=1
SetEnvIf Request_URI "/^status_check.php$" dontlog=1
Also with just dontlog at the end without the '=1' part.
However none seem to work. I should explain the site runs on the following physical path: /var/www/vhosts/site_name
Could someone explain please what I am doing wrong? It's driving me mad.
Many Thanks