__Use of Browser Shortcut Icon with bitweaver __

''I brought this over from my ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and ((bitweaver and TikiWiki)) page... ''

__Here is a bitweaver icon:__ {img src="http://www.bitweaver.org/show_image.php?id=5"}
(Icon is not showing, probably due to image converter not dealing with .ico files.)

Some web browsers can display small icons for web pages, such as in the location bar or shortcut lists.

Microsoft Internet Explorer by default looks for this at __/favicon.ico__, so it also is called __favicon__.

Browsers can be told where to find the shortcut icon by including that information in the ~lt~head~gt~section of a web page. If this link to a shortcut icon is defined but the icon file does not exist, the browser might display a null icon.

In bitweaver, every page on a site can specify a single shortcut icon by inserting the following in __templates/header.tpl__ just ahead of ~lt~/head~gt~. If using several domains on a bitweaver server, there will be a directory for each domain in the __templates__ directory. The __header.tpl__ file can be copied to such a directory, which allows different icons to be specified for each domain. The icon can be defined as being in a different location than __/favicon.ico__.

^ ~lt~link REL="shortcut icon" HREF="/favicon.ico" TYPE="image/x-icon"~gt~^

At present bitweaver has no support for administration of shortcut icons, so that template file has to be altered. Probably this should be part of ((IconThemes)).

----

Although some browsers may ask only for __/favicon.ico__, in the root directory for the web server, the web server may be able to alter the request. For example, Apache can test the domain name and direct a request to an appropriate file.

In the Apache configuration file, to direct three subdomains to different directories:
{CODE()}
### Rewrite rules for subdomains
# Test that the host name begins with the desired subdomain.
# Test if the request is for /favicon.ico.
# If true, Rewrite favicon to domain's location, and leave these rules.
RewriteCond %{HTTP_HOST} ^public.*
RewriteCond %{REQUEST_URI} ^/favicon.ico$
RewriteRule ^/favicon.ico /public/favicon.ico [L]

RewriteCond %{HTTP_HOST} ^member.*
RewriteCond %{REQUEST_URI} ^/favicon.ico$
RewriteRule ^/favicon.ico /member/favicon.ico [L]

RewriteCond %{HTTP_HOST} ^staff.*
RewriteCond %{REQUEST_URI} ^/favicon.ico$
RewriteRule ^/favicon.ico /staff/favicon.ico [L]
{CODE}
Page History
Date/CommentUserIPVersion
13 Nov 2008 (18:20 UTC)
xing62.47.245.714
Current • Source
SEWilco209.98.144.163
View • Compare • Difference • Source