The maximum flexibility for removing unwanted information from log files is obtained by post-processing the logs, or using piped-logs to feed the logs through a program which does whatever you want. However, Apache does offer the ability to prevent requests from ever appearing in the log files. You can do this by using the
SetEnvIf directive to set an environment variable for certain requests and then using the conditional
CustomLog syntax to prevent logging when the environment variable is set.