Jump to content

Favicon.ico


es131245

Recommended Posts

Ive jsut started writing my page and...ive used....<link rel="shortcut icon" href="./images/favicon.ico">it works but i sometimes in ./log/apache2/error.log apear [Fri May 15 10:25:52 2009] [error] [client 123.123.123.123] File does not exist: /var/www/favicon.icowhy? Now ive relocated favicon.ico and edited page bit im tring to understand why it apeared...Quetiont #2<link rel="shortcut icon" href="./images/favicon.ico"> works for http://localhost/index.php but not for http://123.123.123.123/index.phpand im getting image with both http://localhost/favicon.ico and http://123.123.123.123/favicon.icowhats wrong???

Link to comment
Share on other sites

[Fri May 15 10:25:52 2009] [error] [client 123.123.123.123] File does not exist: /var/www/favicon.icowhy?
Because that file doesn't exist. If it did exist, you wouldn't get that error. Notice it's not looking inside the images directory. You should put your favicon in the root anyway.
<link rel="shortcut icon" href="./images/favicon.ico">works for http://localhost/index.php but not for http://123.123.123.123/index.phpand im getting image with both http://localhost/favicon.ico and http://123.123.123.123/favicon.icowhats wrong???
Your link points to a file inside the images directory.
Link to comment
Share on other sites

My favicon.ico was in image directory and link was pointing to the directory too... so why did it look for favicon.ico in the main directory????

Link to comment
Share on other sites

All browsers do by default, which is why it makes sense to put it there. You can *also* add a link tag to point to it, but you don't need it, browsers will look for it automatically at the root.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...