The mod_autoindex module assists with automatic listings of server directory contents. This module can create icons and descriptions for each of the files in the directory, as well as display file content before and after the index itself.
AddAlt |
AddAlt string filenames|suffixes ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
AddAlt "Image" .gif .jpg .png AddAlt "Logo" logo.gif
AddAltByEncoding |
AddAltByEncoding string mime-encoding ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Similar to AddAlt, except that it specifies alternative text based on the MIME content encoding of the file being listed. For example, to specify the string "gzip" for a file encoded using the gzip compression program, the directive would be:
AddAltByEncoding "gzip" x-gzip
AddAltByType |
AddAltByType string mime-type ... access.conf/<Directory>
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Similar to AddAlt, except that it specifies alternative text based on the media type of the file being listed. For example, to use the alt text "image" for all GIF files, the directive would be:
AddAltByType "image" image/gif
AddDescription |
AddDescription string file ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Used to associate a descriptive text phrase with a particular type of file. The text appears to the right of the filename in a directory index. The descriptive text must be surrounded by quotes and should be fairly short. Files can be associated by extension or name. For example:
AddDescription "GIF image file" .gif AddDescription "The bottom of Hoover Dam" /home/user/vacation1.gif
AddIcon |
AddIcon icon name ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Specifies an icon image to be displayed with a given type of file in a directory index. For example:
AddIcon /icons/image.gif .gif .jpg .png
An optional syntax lets you specify alternative text in this directive as well:
AddIcon (IMAGE,/icons/image.gif) .gif .jpg .png
Three values can be used for the file extensions in the AddIcon directive:
AddIconByEncoding |
AddIconByEncoding icon mime-encoding ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
AddIconByEncoding /icons/gzip.gif x-gzip AddIconByEncoding (GZIP,/icons/gzip.gif) x-gzip
AddIconByType |
AddIconByType icon mime-type
[server config, within <VirtualHost> or <Directory>, or .htaccess]
AddIconByType /icons/image.gif image/* AddIconByType (IMAGE,/icons/image.gif) image/*
DefaultIcon |
DefaultIcon url access.conf/<Directory>
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Specifies the default icon to use when no icon image has been assigned by one of the AddIcon* directives.
FancyIndexing |
FancyIndexing on|off
[server config, within <VirtualHost> or <Directory>, or .htaccess]
HeaderName |
HeaderName filename
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Specifies a file to be inserted at the top of the listing when generating a directory index. The example file uses the following setting:
HeaderName index.html
IndexIgnore |
IndexIgnore filename ...
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Tells the server to ignore (hide) certain files when automatically building a directory index on the fly. The files are specified as full server paths, and you can use the wildcards * and ? with their usual meanings. Thus, to ignore all hidden files (i.e., files whose names begin with a period) at every level, you could use the following setting:
IndexIgnore */.?*
IndexOptions |
IndexOptions option ... access.conf/<Directory>
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Specifies a number of options to use when creating a directory index on the fly. Possible options are:
ReadmeName |
ReadmeName filename
[server config, within <VirtualHost> or <Directory>, or .htaccess]
Specifies a file to be appended to the end of a file listing when generating a directory index. The example file uses the following setting:
ReadmeName README
Copyright © 2003 O'Reilly & Associates. All rights reserved.