tags:

views:

383

answers:

1

i have a favicon.ico in my webroot folder according to this piece of code

<link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />

and i use this in my header to make it appear on all the pages.

<?php echo $html->meta('icon', 'favicon.ico'); ?>

The site am working on is -----> this.

What can possibly be wrong ? It works in 3 pages on IE. On firefox and chrome, it works only for homepage, not others.

Please let me know what i should do.

+3  A: 

You ought to just use href="/favicon.ico". If you notice the source of http://www.movend.com/developers/, for example, your reference to favicon.ico resolves to http://www.movend.com/developers/favicon.ico, which is a 404 error page.

JustinStolle
The reason it works in IE is that IE will additionally look for a favicon.ico file in the root of the site on its own.
JustinStolle
If you notice the home page also has the same php code that takes me to webroot. The link favicon.ico for homepage works. Please check that. When it works for homepage, why isn't it working for the other pages?
The `webroot` code doesn't appear to be doing anything because when you view the source of your pages, your href is just pointing to favicon.ico without any path in front of it. Since your other pages are in subdirectories below the root, it's referencing a file that isn't there. It works on the homepage because the file does exist in the root folder.
JustinStolle