[Sat Nov 19 13:17:04 2011] [error] [client 1.1.1.32] File does not exist: /var/www/vhosts/x.com/httpdocs/scores.asp
[Sat Nov 19 13:17:54 2011] [error] [client 1.1.1.32] File does not exist: /var/www/vhosts/x.com/httpdocs/reqewrqwe.awwe
Solved thanks
Create a
RewriteRule
and return an empty file in response to the URLs you'd like to remove from the logs:In case you don't have any pattern for the URLs and you want to prevent for all non-existing files, add a
RewriteCond
:Or just with a more current apache:
and then
index.php
giving a 404 status response:The
index.php
file must exists, otherwise (for theRewriteRule
) this would create an endless loop.Alternatively this might work (and won't require the
index.php
file):See: Apache2: how to avoid logging certain missing files into error.log