bitweaverShortcutIcon

Created by: SEWilco, Last modification: 13 Nov 2008 (18:20 UTC) by xing
{{Exterminate|
|date=13-November-2008
}}

Use of Browser Shortcut Icon with bitweaver

I brought this over from my bitweaver and TikiWiki page...

Here is a bitweaver icon: Image
(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 <head>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 </head>. 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.

<link REL="shortcut icon" HREF="/favicon.ico" TYPE="image/x-icon">


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()}
      1. Rewrite rules for subdomains
  1. Test that the host name begins with the desired subdomain.
  2. Test if the request is for /favicon.ico.
  3. 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}

Comments

Re: Carlos' newbie comment:

by xing, 24 Jan 2005 (15:48 UTC)
hey carlos...
there's information from you wverywhere i look :)
anyway, the menus are well underway and it's only a matter of time until i've got most of the features you mention working. i'm not sure about dynamically enhancing the application menu, but the other stuff is already in there and i think it's working quite well already.

xing
  Page 1 of 1  1