Server Settings - Display of Directory Lists
With the Apache web server you can control the display of directories (= file folders). I.e. the author themselves can determine what is displayed for an URL that is pointing to a directory: A specific file (which one?) or a list (how?).
To do this, you have to create a file .htaccess
in the relevant directory.
This then also affects the subdirectories!
Displaying a File - Not a List
DirectoryIndex Relative-URL ...
-
Relative-URL is usually a file name in the directory.
If more than one is specified, the first one found is sent.
If there is no such file, an error will be displayed.
Standard:DirectoryIndex index.html index.htm index.php
Displaying a File List
Options + Indexes
- List all files (for download)
Standard: no list
Example: .htaccess - Result: .../dir1/
Appearance of the Directory List:
IndexOptions
Options ...-
- The following options are available:
Fancyindexing
- detailed directory list (icons, name, size, short description etc.)
SuppressLastModified
- no indication of the last Modification time
SuppressSize
- no indication of the file size
SuppressDescription
- no indication of a short description
ScanHTMLTitles
- HTML title as short description- Example:
IndexIgnore
file_name ...-
Which files should not be listed (also patterns as in the shell with * or similar possible).
Standard:IndexIgnore /.?? *~ *.bak
HeaderName
file_name
ReadmeName
file_name-
Displaying a file content before and/or after the directory list. It has to be an HTML or text file (that means no image or similar). The content of <TITLE> cannot be influenced.
- Standard:
HeaderName HEADER
ReadmeName README- Example:
-
- .htaccess file in the directory dir4 contains:
HeaderName top.html
ReadmeName end.txt- Result: .../dir4/
- .htaccess file in the directory dir4 contains:
AddDescription
"Text" file_name
AddIcon
(ALT,/path/to/icon) file_name- Specification of a short description or an icon for a file (or more at file name pattern).
ALT is a string for ASCII browser
<IMG ALT=...>. Furthermore
AddIconByEncoding, AddIconByType, DefaultIcon
are posssible.
Standard: - no description, standard icon set
Further information: Apache documentation