[drupal-support] favicon.ico problem revisited
Gunther Herzog
storysmith at softhome.net
Fri Aug 12 16:21:54 UTC 2005
Hello drupal-support,
Sorry if this is a repeat of something covered
on-site, but I was unable to find a solution to
the problem there with a search for "favicon"...
The problem: I installed Drupal as my site root,
using the default .htaccess and "friendly" paths
(no ? query).
Unfortunately, my favicon.ico file became
inaccessible. Since a direct access to the the
favicon.ico file resulted in "access denied", my
thinking is that this may be the first thing
that needs to be tackled. After all, if I cannot
access the file directly, how will the browser
be able to pull it in, even if it knows about
it's existence?
My first step: modify .htaccess as follows...
# ====[start of sample code]====
RewriteEngine on
# bypass rewrites on icon request
RewriteCond %{REQUEST_URI} "favicon.ico"
RewriteRule (.*) $1 [L]
# ====[end of sample code]====
That patch seems to work. Partially. At least
now I can access the icon directly, as in...
http://InsertSiteNameHere/favicon.ico
Unfortunately, the browsers I'm testing with
STILL won't show the icon consistently. I've
restarted, cleared caches, and set to check for
page updates with each request. With the
following results:
Microsoft Internet Explorer: NO ICON
Mozilla 1.7.x: NO ICON
FireFox 1.0: HURRAH! MY ICON SHOWS!
Mind you, the above browsers ALL show icons for
other sites, just not mine :(
I did some research and found that there is an
additional directive that can be added to HTML
to at least suggest to a browser that there is a
favicon to be had...
<!--[start sample of code]-->
<HEAD>
<LINK REL="SHORTCUT ICON"
HREF="/~your_directory/logo.ico">
</HEAD>
<!--[end of sample code]-->
Since this needs to go in the HTML header, I'm
wondering where it should go... is there source
for header generation in Drupal core? Or should
that mod go in a theme?
Reference sources:
http://chami.com/tips/internet/110599I.html
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
--
Best regards,
Gunther mailto:storysmith at softhome.net
More information about the drupal-support
mailing list