2.3.79 IndexOptions
IndexOptions specifies the option of the function that formats and displays the directory index.
Description
IndexOptions specifies the option of the function that formats and displays the directory index. The option becomes enabled by specifying + or by omitting +- before option. By default, all options are disabled. The following shows the list of options that can be specified:
Option |
Meaning |
---|---|
Charset=character_set |
Specifies the character set of the page that is to be displayed in the index. If the character set used in the file specified by the HeaderName directive or by the ReadmeName directive is different from the default character set (ISO-8859-1), specify the same character set used in the file specified by the HeaderName directive or by the ReadmeName directive. Note that this option cannot have =character_set omitted. In addition, this option operates the same as +Charset even if -Charset is specified. The default value when this option is omitted is ISO-8859-1. |
DescriptionWidth[={number_of_characters|*}] |
Specifies the width of the area used for file explanation in number of characters (one character = 1 byte). If * is specified, the width of the area used for file explanation will be the maximum length of characters that is specified in the AddDescription directive. When this option is omitted, the width of the area used for file explanation is 23 bytes (However, if SuppressSize is specified, the width of the area to be displayed will be 30 bytes. If SuppressLastModified is specified, the width of the area to be displayed will be 42 bytes.). When -DescriptionWidth is specified, ={number_of_characters|*} can be omitted. In this case, the width of the area to be displayed will be 23 bytes. The default value when this option is omitted is 23, 30, 42, or 49. |
FancyIndexing |
Enables the function that formats and displays the directory index |
FoldersFirst |
Displays directories before files in the index. However, this option can be specified only when FancyIndexing is enabled. |
IconsAreLinks |
Sets the icon as the anchor to link to the files when the directory index is formatted and displayed |
IconHeight[=number_of_pixels] |
Specifies the height of the icon used when the directory index is formatted and displayed, in number of pixels. Specify this option together with the IconWidth option. This option becomes the HEIGHT attribute of the IMG tag of the HTML that displays the index. You can specify the value of 1 or more. The specifiable values are >0 . The default value when this option is omitted is 22. |
IconWidth[=number_of_pixels] |
Specifies the width of the icon used when the directory index is formatted and displayed, in number of pixels. Specify this option together with the IconHeight option. This option becomes the WIDTH attribute of the IMG tag of the HTML that displays the index. You can specify the value of 1 or more. The default value when this option is omitted is 20. |
IgnoreCase |
Sorts the file and directory names without case sensitivity when the directory index is formatted and displayed |
NameWidth[={number_of_characters|*}] |
Specifies the width of the area used for the file name or directory name in number of characters (one character = 1 byte). If * is specified, the width of the area used for the file name or directory name will be the maximum length of characters. When you want to omit ={number_of_characters|*}, always specify this option as -NameWidth. The default value when this option is omitted is 23. |
ScanHTMLTitles |
Searches for the <TITLE> tag in the HTML file and displays the title as an explanation when no specification exists in the AddDescription directive |
SuppressColumnSorting |
Suppresses the function for sorting the index of columns for file name, directory name, date and time of the latest update, file size, and explanation |
SuppressDescription |
Does not display the file explanation |
SuppressHTMLPreamble |
When the HeaderName directive is specified, outputs the file content specified in the HeaderName directive and the HTML header part (such as <HTML> and <TITLE>) that is automatically generated. When the file specified in the HeaderName directive is written in HTML, this option suppresses the output of the HTML header part that is automatically generated. |
SuppressLastModified |
Suppresses the date and time of the latest update to be displayed |
SuppressSize |
Suppresses the file size to be displayed |
TrackModified |
Sets the Last-Modified value and the Etag value in the HTTP response header of the response for displaying the directory. Specifying this option enables the client to track the changes made to the file configuration in the directory during a HEAD request, thus resulting in using the cache function of the client. This option is valid only when the operating system and the file system support stat(). |
Syntax
IndexOptions [{+|-}]option [[{+|-}]option ...]
Notes
-
When specifying this directive more than once, a different character string cannot be specified for the same file name.
-
When specifying =value in IconHeight, IconWidth, and NameWidth, - cannot be specified.
-
The options that are set are inherited in the order of httpsd.conf, <VirtualHost>, <Directory>, and then .htaccess, from higher to lower directories. The inherited options are eventually merged, and the format for displaying the index is determined.
-
Options that have +- attached to httpsd.conf will be invalid. However, an option is inherited in the order of httpsd.conf, <VirtualHost>, <Directory>, and .htaccess, and then to lower directories. The inherited option specification becomes effective during the merging process. The merging process is performed when the specification of an option has a reference sequence at a low directory or when a directive of one of the following is specified:
-
AddAlt
-
AddAltByEncoding
-
AddAltByType
-
AddDescription
-
AddIcon
-
AddIconByEncoding
-
AddIconByType
-
DefaultIcon
-
HeaderName
-
ReadmeName
Example:
When IndexOptions +FancyIndexing +IconsAreLinks is specified in the httpsd.conf file, and the directive related to index at a lower directory is not specified, FancyIndexing and IconsAreLinks become disabled.
When IndexOptions +FancyIndexing +IconsAreLinks is specified in the httpsd.conf file and AddDescription "text_file" *.txt is specified in the access control file in the lower directory, FancyIndexing and IconsAreLinks become enabled.
-
-
If the Charset, IconHeight, IconWidth, and NameWidth directives are specified without +- within the specified location, the options with +- specified (except for Charset, IconHeight, IconWidth, and NameWidth) before that location become invalid.
Example:
IndexOptions FancyIndexing -IconsAreLinks IconHeight IconWidth
In this case, the FancyIndexing, IconHeight, and IconWidth directives are enabled. The - specified for IconsAreLinks is not inherited.
-
For the merge processing when the option is specified for the same directory index between the specified locations, when the option without +- is specified in the location at the lower priority for being referenced, the option that was specified earlier becomes invalid. However, IconHeight, IconWidth, and NameWidth do not become invalid.
Example 1:
-
Specification in the httpsd.conf file
IndexOptions +FancyIndexing +IconsAreLinks
-
Specification in the access control file
IndexOptions FancyIndexing SuppressLastModified
When these are specified, IconsAreLinks becomes invalid. FancyIndexing and SuppressLastModified become valid.
Example 2:
-
Specification in the httpsd.conf file
IndexOptions SuppressColumnSorting +FancyIndexing +IconsAreLinks
-
Specification in the access control file
IndexOptions FancyIndexing SuppressLastModified
When these are specified, SuppressColumnSorting and IconsAreLinks become invalid. In addition, FancyIndexing and SuppressLastModified become valid.
-
-
For the merge processing when the option is specified for the same directory index between the specified locations, the - specification becomes valid if both + and - is specified for the same option.
Example:
-
Specification in the httpsd.conf file
IndexOptions +FancyIndexing -IconsAreLinks
-
Specification in the access control file
IndexOptions +IconsAreLinks
When these are specified, IconsAreLinks becomes invalid.
-
-
When the option without +- is specified in the same specified location, the option with +- specified becomes invalid except for the Charset, IconHeight, IconWidth and NameWidth directives.
Example 1:
-
Specification in the httpsd.conf file
IndexOptions +IconsAreLinks FancyIndexing +SuppressLastModified
In this case, IconsAreLinks becomes invalid.
Example 2:
-
Specification in the <VirtualHost> block, <Directory> block, or access control file
IndexOptions +IconsAreLinks FancyIndexing +SuppressLastModified
In this case, IconsAreLinks and SuppressLastModified become invalid.
-
Locations where it can be written
httpsd.conf, <VirtualHost>, <Directory>, and .htaccess
Overwrite permission
Indexes level