Loading...
 
Skip to main content

History: WikiShortcutIcon

Preview of version: 2

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.

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.

<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, 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:

Copy to clipboard
### Rewrite rules for subdomains # Rewrite favicon to domain's location 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

History

Advanced
Information Version
Philippe Cloutier partially uncategorozed 3
View
SEWilco created from notepad 2
View