Name
HeaderName
Synopsis
HeaderName filename
Server config, virtual host, directory, .htaccess
This
directive inserts a header, read from
filename
, at the top of the index. The
name of the file is taken to be relative to the directory being
indexed. Apache will look first for
filename
.html and, if
that is not found, then filename
.
Apache Versions After 1.3.6
filename
is treated as a URI path relative
to the one used to access the directory being indexed and must
resolve to a document with a major content type of
“text” (e.g., text/html,
text/plain, etc.). This means that
filename
may refer to a CGI script if the
script’s actual file type (as opposed to its output)
is marked as text/html, such as with the following directive:
AddType text/html .cgi
Content negotiation will be performed if the
MultiViews
option is enabled. If
filename
resolves to a static text/html
document (not a CGI script) and the Includes
option is enabled, the file will be processed for server-side
includes (see the mod_include documentation).
If the file specified by HeaderName contains the
beginnings of an HTML document (<HTML>
,
<HEAD>
, etc.), then you will probably want
to set IndexOptions
+SuppressHTMLPreamble
, so that these tags are not
repeated. (See also ReadmeName.)
<Directory /usr/www/APACHE3/fancyindex.txt/htdocs> FancyIndexing on AddDescription "One of our wonderful catalogs" catalog_autumn.html catalog_summer.html IndexIgnore *.jpg IndexIgnore .. icons HEADER README AddIconByType (CAT,icons/bomb.gif) ...
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.