Results 1 to 11 of 11
Thread: File does not exit: Favicon.ico
-
08-16-2014, 12:44 PM #1Newbie
- Join Date
- Aug 2014
- Posts
- 21
File does not exit: Favicon.ico
Hello,
I use Wordpress and I serve my favicon as png with link tag.
HTML Code:<link href="/wp-content/themes/example/images/favicon.png" rel="icon" type="image/vnd.microsoft.icon"/>
Code:[Sat Aug 16 09:54:09 2014] [error] [client **.**.***.***] File does not exist: /var/www/vhosts/example.com/httpdocs/favicon.ico
Thanks.
-
08-16-2014, 01:41 PM #2Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
First of all, your mime type does not match the actual file.
Second, these requests come from clients which still expect to download it from the root directory. You could simply have a symlink.
-
08-16-2014, 03:04 PM #3Newbie
- Join Date
- Aug 2014
- Posts
- 21
Thank you so much for your reply.
Thanks also for the warning. I am not sure why I placed "image/vnd.microsoft.icon". I recall that it was necessary to include image/vnd.microsoft.icon for Internet Explorer but I am not sure. Should it be image/png?
How can I create the symlink? Also can symlinking ICO to PNG create any issues?
Thanks
-
08-16-2014, 05:19 PM #4Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
For a PNG file, this would be the appropriate mime type. However you are right, simply symlinking the icon file to the PNG file might easily "confuse" a client. You can also simply copy an ICO counterpart in the root directory.
-
08-16-2014, 05:51 PM #5Newbie
- Join Date
- Aug 2014
- Posts
- 21
Thanks again.
I changed mime/type and placed a favicon.ico in root directory.
Now the error is gone in error_log but when I view the favicon.ico by Google Chrome, it downloads the file rather than showing.
But when I view google.com/favicon.ico by Chrome, it shows the image.
How can I make my favicon.ico to display rather than download?
Thanks
-
08-16-2014, 06:17 PM #6Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
Most likely a header issue (random guess, mime type for ICO files). Check the headers of your site and compare them to Google.
-
08-16-2014, 07:33 PM #7Newbie
- Join Date
- Aug 2014
- Posts
- 21
Thanks again.
Yes, it is served as text/plain.
I searched hosting company documentation. They recommend adding mime type for .htaccess file. I am not sure it is good idea to change .htaccess file just for one ICO file.
Also mime/types are available in /etc/mime.types file. Which file (htaccess or mime.types) does consume less resource when adding mime/types?
Thanks
-
08-17-2014, 03:29 AM #8Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
mime.types is for the system itself. In your case you should either edit the Apache configuration or the htaccess. The latter might have theoretically a tiny performance drawback compared to the former, but as you seem to already have it in place it wouldnt matter anyhow.
-
08-17-2014, 07:32 AM #9Junior Guru Wannabe
- Join Date
- Jan 2014
- Posts
- 35
first upload .ico file to your server then add complete url in header section.
-
08-17-2014, 04:52 PM #10Newbie
- Join Date
- Aug 2014
- Posts
- 21
-
08-18-2014, 04:04 AM #11Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
The mime type is not really an issue in this case anyhow. But should it still bother you, just add the desired mime type to the Apache configuration. But again, for this particular case it doesnt really matter. The browser will display whatever it finds under the given filename and might even display correctly regardless of the file extension.
Similar Threads
-
HELP : About favicon.ico
By iamglennmar in forum Web Design and ContentReplies: 3Last Post: 03-10-2011, 08:49 PM -
Using favicon.ico?
By Goldfiles in forum Web Design and ContentReplies: 7Last Post: 06-03-2008, 01:25 PM -
What does this mean? Favicon.ico
By fjiwa in forum Web Hosting LoungeReplies: 16Last Post: 09-09-2003, 08:43 AM -
Favicon.ico
By Axi in forum Web Hosting LoungeReplies: 8Last Post: 09-08-2003, 01:38 AM