0

I have a favicon in the head of all the pages on my site. However it is not appearing on any of the pages in the main directory of my site.

I have two versions of my site one for testing and one that is live for the public.

In my root directory, all of the files have the following two lines:

<base href='https://example.com/'>
<link rel="shortcut icon" type="image/ico" href="web/favicon.ico"/>

And in my beta directory:

<base href='https://example.com/beta/'>
<link rel="shortcut icon" type="image/ico" href="web/favicon.ico"/>

I have verified that the image exists in both of these locations:

https://example.com/web/favicon.ico
https://example.com/beta/web/favicon.ico

However it only works in my beta directory and I have no idea why. Any ideas or assistance with this would be greatly appreciated.

Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76
  • Just tested in firefox and it works fine but in chrome it does not, these files have been uploaded a few days now and I've cleared cache and cookies nearly on an hourly basis while I was testing other things before coming back to this. – Paddy Hallihan Apr 13 '18 at 12:21
  • Possible duplicate of [How do I force a favicon refresh](https://stackoverflow.com/questions/2208933/how-do-i-force-a-favicon-refresh) – wf4 Apr 13 '18 at 12:23

2 Answers2

0
//place your image icon in a specified path

//add that code in your html code
<link rel="shortcut icon" type="image/ico" href="images/favicon.png"/>
Mahendran
  • 16
  • 2
0

It could be related with some security access policy.
Maybe the favicon you have in beta directory can be read by everyone, and the other one can't.
In a linux system, you may try this:

sudo chmod +r yourprojectpath/web/favicon.ico

So that the favicon.ico file can be read from all programs are running over the server.
Hope it could be useful.

Foxhole
  • 400
  • 4
  • 10