Mystery of the disappearing favicon, cont.

Permalink 1 user found helpful
My favicon renders in google chrome and i.e. ok when the address bar does not include "www.". However, when you add the prefix "www." in the address bar the favicon disappears.

domain is: SaintStephenOfHungary.net

What the hey?

jamesfinn
 
hostco replied on at Permalink Reply
hostco
Define the base url in /config/site.php by adding this line of code to it and saving the file.

define('BASE_URL', 'http://saintstephenofhungary.net');
jamesfinn replied on at Permalink Reply
jamesfinn
is that /config in the root directory or in the concrete directory? The one in the concrete directory does not have a /site.php file while the /config in the root directory does. I ask because I added the code to this file to no avail. Should I copy the /site.php file to /concrete/config?

Thanks for your help!

Note: using default theme Greek Yogurt; concrete5.5.1
hostco replied on at Permalink Reply
hostco
This is /config/site.php in the root.

If you set your base url as described, it will not allow www. to load.

It will forcehttp://saintstephenofhungary.net... with no www.
jamesfinn replied on at Permalink Reply
jamesfinn
I added the string of code provided verbatim to the file /config/site.php to no avail.
hostco replied on at Permalink Reply
hostco
If you would not mind giving me FTP access, I can log in a take a look at whats going on and help you fix it.

Please PM me FTP details if you would like.
jamesfinn replied on at Permalink Reply
jamesfinn
why does my favicon work only when the address bar url reads without "www." prefix.

Try it: visit SaintStephenOfHungary.net

then add the "www." and watch the favicon disappear.

ideas?. . . anyone?
hostco replied on at Permalink Best Answer Reply
hostco
Its because how the favicon.ico is linked.

Upload your favicon.ico to your themes image directory.

Next add this line of code to your header.php file and save it

<link rel="shortcut icon" href="<?php echo $this->getThemePath()?>/images/favicon.ico">
jamesfinn replied on at Permalink Reply
jamesfinn
To Hostco:

Thank you for this "best" answer. Now I see how you earned all of your karma points. Your help is recognized and appreciated and has gone towards a good cause.

To everyone:

Listen to hostco - he knows his stuff and his rep is real!
hostco replied on at Permalink Reply
hostco
If you view your source code with no www. you see this

<link rel="shortcut icon" href="/files/5413/3255/1656/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/files/5413/3255/1656/favicon.ico" type="image/x-icon" />


with www. added it looks like this

<link rel="shortcut icon" href="/files/" type="image/x-icon" />
<link rel="icon" href="/files/" type="image/x-icon" />


This is why I first suggested you to set your base url.
jamesfinn replied on at Permalink Reply
jamesfinn
OK - thank you so much for your input here. I will try this later and will be sure to post either way. Doing graphics editing right now, will delve into the server later. Thanks again.
hostco replied on at Permalink Reply
hostco
No problem, glad to help out.