Welcome Guest, Not a member yet? Register   Sign In
favicon.ico
#1

[eluser]DougW[/eluser]
I am getting tons of 404s for a missing favicon.ico (thanks Microsoft). Of course, I can;t just throw one in the root directory because of the way CI handles the framework. What is the best way to incorporate a favicon.ico in a CI site?

BTW, I tried putting it in /images which is excluded in my htaccess and then also using the <link type=ico...> html line and that didn't work. I also added |favicon\.ico to my htaccess string and that didn't work.

My site is generating thousands of 404s per day now and it is aggravating!

Plz help.
#2

[eluser]jedd[/eluser]
Here's what I have in the view header. I had to change the last parameter around to get it working (different sources suggest x-icon, image/png, etc. Weirdage.

Code:
echo  link_tag('assets/icons/FAVICON.png', 'shortcut icon', 'image/ico');

Oh, and of course, yes, link_tag() is part of the [url="http://ellislab.com/codeigniter/user-guide/helpers/html_helper.html"]HTML Helper[/url].
#3

[eluser]DougW[/eluser]
Thanks.

But isn't that exactly the same as this:

<link href="/images/favicon.ico" rel="shortcut icon" type="image/ico" />

which is what I have now? Or does using the helper make it integrate with CI somehow?
#4

[eluser]jedd[/eluser]
Perhaps, but I don't think anything is ever exactly the same.

Try using a png instead of an ico.

What are the file permissions on that file?
#5

[eluser]DougW[/eluser]
Permissions are fine. It is also owned by the apache user. Maybe I'll try the helper as it may set something up before it draws the HTML to allow it to work...

Thanks!
#6

[eluser]louis w[/eluser]
Why can't you add the image to your root directory? Your mod_rewrite should not be rewriting urls to actual files on the server.




Theme © iAndrew 2016 - Forum software by © MyBB