html - PHP - Should I add a favicon.ico to avoid a 404 error? -
i read browser looking automatically favicon.ico - case in android webview element? should include favicon.ico php page below, avoid 404 error in logs?
<? //php code... ?> <!doctype html> <head> <title>hello world</title> </head> <body> <-- content... --> </body> </html>
this happens because (almost every) browser searches favicon default. if accessed page don't inform valid url it, apache uses root directory.
you have 2 choices. can create website icon each of websites, or tell apache not log event error message.
1).
if choose second option, add following code each virtualhost, or @ least ones don’t have favicon file:
redirect 404 /favicon.ico <location /favicon.ico> errordocument 404 "no favicon" </location> 2).
there no way stop browsers requesting it. can either create favicon, or create 0 byte file called favicon.ico , place in web root.
Comments
Post a Comment