0

All browsers are not equal. Hence I need to explicitly state that I have a favicon ("shortcut icon") for mod_autoindex-generated pages. How can I do that?

Using header (HeaderName) and footer (ReadmeName) is not an option because those get included into the HTML-body. I need to manipulate the <head> part of the generated HTML.

Edit 1: The first reply states to use /favicon.ico. This is not a solution either, because as I stated above not all browsers request that file automagically. I have a very stubborn Firefox 8.0 here that refuses to load it for example. This can be seen in the server logs (missing HTTP request for that existing and readable file - yes, it works in Opera, for example) and and in FF itself (with the Live HTTP headers addin). No HTTP request to the server, which cannot logically be explained with the /favicon.ico not being readable.

0xC0000022L
  • 1,576
  • 2
  • 24
  • 42

2 Answers2

3

Add the IndexOptions +SuppressHTMLPreamble option to the .htaccess file to suppress mod_autoindex's automatic injection of the preambulatory <html><head></head><body> tags and then include those tags and your desired <link> tag in your Header.html file.

This option is available in Apache 1.3 and later.

0xC0000022L
  • 1,576
  • 2
  • 24
  • 42
2

All browsers request "/favicon.ico" at least once when you visit a web host.

Just create it.

adaptr
  • 16,746