Posted 2004-11-07T14:23:00+01:00 in recipe apache
Most browsers automatically make a request for an icon on a visit to a website. If you don't have a favicon.ico in your document root, this produces a lot of error notices in your apache log. The configuration snippet below makes sure that you won't see that pesky favicon in your logs anymore.
# Stop the webserver from stat-ting DOCUMENTROOT/favicon.ico
# and writing notices to ErrorLog:
Redirect /favicon.ico Gone
# Mask request to /favicon.ico in the access log:
SetEnvIf Request_URI "^/favicon\.ico$" favicon_and_alike=favicon
CustomLog /var/log/apache2/access.log common env=!favicon_and_alike