Я пытаюсь удалить какой-то запрос из журналов Apache. например, если запрос соответствует "RunJobs & tasks = jobs"
я пытаюсь использовать
SetEnvIf Request_URI "(RunJobs&tasks=jobs)" dontlog
CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined env=!dontlog
но request_URI не содержит запроса, который останавливается на имени файла.
Я проверил другие возможности, но ничего не помогло:
Remote_Host
Remote_Addr
Server_Addr
Request_Method
Request_Protocol
Request_URI
как предотвратить журнал, если запрос соответствует RunJobs & tasks = jobs?
Спасибо
Так как SetEnvIf Query_String
не существует, вот способ добиться этого:
# Set an environment variable when the query string matches a certain string.
# Modify the string you match against according to your requirements.
# In this example any non empty query string matches.
RewriteCond %{QUERY_STRING} !^$
RewriteRule (.*) $1 [E=dontlog:yes]
# Use the env variable set above to remove from logging file.
CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined env=!dontlog
из http://www.gossamer-threads.com/lists/apache/users/326145