WikiShortcutIcon

Use of Browser Shortcut Icon with TikiWiki.

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 TikiWiki, 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 TikiWiki 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 TikiWiki has no support for administration of shortcut icons, so that template file has to be altered.



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:
### 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]



by SEWilco 2004-04-22

Contributors to this page: Chealer92127 points  and SEWilco125 points  .
Page last modified on Saturday 24 April 2004 23:57:27 CEST by Chealer92127 points .

Switch Language

Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki

Shoutbox

Torsten2431 points , 00:16 CEST, Fri 18 May 2012: oops Marc postponed to Friday 18th of May and then always at the third Friday
Torsten2431 points , 14:06 CEST, Sun 22 Apr. 2012: Next Webinar at Thursday, 17th of May 2012 (21:00 UTC)at http://tiki.org/live
Torsten2431 points , 11:43 CEST, Tue 10 Apr. 2012: Next Webinar at Thursday, 19th of April 2012 (21:00 UTC) at http://tiki.org/live
Jyhem2569 points , 13:07 CET, Fri 16 Mar. 2012: What happened to the BBB room ?
Torsten2431 points , 01:44 CET, Sat 25 Feb. 2012: Next Webinar at Thursday, 15th of March 2012 (21:00 UTC) at http://tiki.org/live