tags:

views:

248

answers:

5

Hey guys,

I have copied my favicon.ico file to my Apache document root. I had to add an Apache Rewrite exception for it and now it is accessible from www.example.com/favicon.ico. But when I hit my main URL it does not show up.

I thought all you had to do was copy the file with the correct permissions into the doc root? Do I need to make php changes? Thanks!

+2  A: 

Try throwing this tag in the head of your document:

<link href="/favicon.ico" type="image/x-icon" rel="icon" />
just_wes
A: 

Try placing the ico file in an images folder in your root. That's where many browsers look for favicon. And that's something to keep in mind. Favicon is a very loose standard, if you can even call it that, which is supported by browsers, not by the server. The browsers themselves actually fetch favicons in separate calls to display on their favorites bars, or tabs... The favicon file just has to be placed somewhere that the browsers can find it.

Paul Sasik
+1  A: 

IE and Firefox can behave differently (not sure which one you are using). Try to add the page as a bookmark, then click the bookmark (to load the page). After you do that exit your browser and see if the if shows up then.

If that does not work try to clear your browser cache and repeat the above steps that should fix it. I have seen your problem before!

meme
It was just a browser cache issue. I cleared my cache in both IE and FF and it pulls up now. Thanks!
roacha
+1  A: 

Could it be that you uploaded the favicon after your browser has remembered that your domain doesn't have one and therefore doesn't issue a new request?

Blagovest Buyukliev
A: 

Some browsers will pick up the icon if its in the root directory without adding anything to the page, however IE and FF don't. Add this code to the head section of your page

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
corymathews