The IndexOptions directive specifies the behavior of the directory indexing. Option can be one of
Note that in versions of Apache prior to 1.3.2, the FancyIndexing and IndexOptions directives will override each other. You should use IndexOptions FancyIndexing in preference to the standalone FancyIndexing directive. As of Apache 1.3.2, a standalone FancyIndexing directive is combined with any IndexOptions directive already specified for the current scope.
There are some noticeable differences in the behaviour of this directive in recent (post-1.3.0) versions of Apache.
The default is that no options are enabled. If multiple IndexOptions could apply to a directory, then the most specific one is taken complete; the options are not merged. For example:
<Directory /web/docs>
IndexOptions FancyIndexing
</Directory>
<Directory /web/docs/spec>
IndexOptions ScanHTMLTitles
</Directory>
then only ScanHTMLTitles
will be set for the
/web/docs/spec directory. Apache 1.3.3 introduced some significant changes in the handling of IndexOptions directives. In particular,
IndexOptions FancyIndexing ScanHTMLTitles
.Whenever a '+' or '-' prefixed keyword is encountered, it is applied to the current IndexOptions settings (which may have been inherited from an upper-level directory). However, whenever an unprefixed keyword is processed, it clears all inherited options and any incremental settings encountered so far. Consider the following example:
IndexOptions +ScanHTMLTitles -IconsAreLinks
FancyIndexing
IndexOptions +SuppressSize
The net effect is equivalent to
IndexOptions FancyIndexing +SuppressSize
, because
the unprefixed FancyIndexing
discarded the incremental
keywords before it, but allowed them to start accumulating again
afterward.
To unconditionally set the IndexOptions
for a
particular directory, clearing the inherited settings, specify
keywords without either '+' or '-' prefixes.