X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=docs%2Fmanual%2Fmod%2Fmod_autoindex.html.en;h=0e7634944ead467c7203ae0afecd8bb183e4f275;hb=0ae5b1af6b6bf3048d2a124e84905f63d6507dea;hp=018a7056e0f4db84d7f900fcee7528f814e3ab1a;hpb=36d32b499809304858c8db725a954d5938823048;p=apache diff --git a/docs/manual/mod/mod_autoindex.html.en b/docs/manual/mod/mod_autoindex.html.en index 018a7056e0..0e7634944e 100644 --- a/docs/manual/mod/mod_autoindex.html.en +++ b/docs/manual/mod/mod_autoindex.html.en @@ -1,23 +1,28 @@ -
-Apache HTTP Server Version 2.3
-Apache HTTP Server Version 2.5
+index.html
. The DirectoryIndex
directive sets the
- name of this file. This is controlled by
+ name of the file or files to be used. This is controlled by
mod_dir
.IndexOptions
directive's
- SuppressColumnSorting
option.
+ SuppressColumnSorting
+ option.
Note that when the display is sorted by "Size", it's the actual size of the files that's used, not the @@ -76,7 +82,10 @@ before a 1011-byte file (if in ascending order) even though they both are shown as "1K".
Apache 2.0.23 reorganized the Query Arguments for Column
- Sorting, and introduced an entire group of new query options.
- To effectively eliminate all client control over the output,
- the IndexOptions
- IgnoreClient
option was introduced.
Various query string arguments are available to give the client
+ some control over the ordering of the directory listing, as well as
+ what files are listed. If you do not wish to give the client this
+ control, the IndexOptions
+ IgnoreClient
option disables that functionality.
The column sorting headers themselves are self-referencing hyperlinks that add the sort query options shown below. Any @@ -220,10 +229,9 @@ icon selected by filename is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.
-
- AddAlt "PDF file" *.pdf
- AddAlt Compressed *.gz *.zip *.Z
-
AddAlt "PDF file" *.pdf +AddAlt Compressed *.gz *.zip *.Z+
- AddAltByEncoding gzip x-gzip
-
AddAltByEncoding gzip x-gzip+
- AddAltByType 'plain text' text/plain
-
AddAltByType 'plain text' text/plain+
"
).
-
- AddDescription "The planet Mars" /web/pics/mars.gif
-
AddDescription "The planet Mars" mars.gif +AddDescription "My friend Marshall" friends/mars.gif+
The typical, default description field is 23 bytes wide. 6
more bytes are added by the IndexOptions SuppressIcon
option, 7 bytes are
@@ -303,6 +309,15 @@ icon selected by MIME content-type
Therefore, the widest default the description column is ever
assigned is 55 bytes.
Since the File argument may be a partial file name,
+ please remember that a too-short partial filename may match
+ unintended files. For example, le.html
will match the
+ file le.html
but will also match the file
+ example.html
. In the event that there may be ambiguity,
+ use as complete a filename as you can, but keep in mind that the
+ first match encountered will be used, and order your list of
+ AddDescription
directives accordingly.
See the DescriptionWidth IndexOptions
keyword for details on overriding the size
of this column, or allowing descriptions of unlimited length.
Absolute paths are not currently supported and do not match + anything at runtime. Arguments with relative path information, + which would normally only be used in htaccess context, are implicitly + prefixed with '*/' to avoid matching partial directory names.
+This sets the icon to display next to a file ending in
name for FancyIndexing
. Icon is either a (%-escaped)
- relative URL to the icon, or of the format
+ relative URL to the icon, a fully qualified remote URL, or of the format
(alttext,url)
where alttext
is the text tag given for an icon for non-graphical browsers.
- AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm
- AddIcon /icons/dir.xbm ^^DIRECTORY^^
- AddIcon /icons/backup.xbm *~
-
^^BLANKICON^^
is only used for formatting, and so
+ is unnecessary if you're using IndexOptions
+ HTMLTable
.
#Examples +AddIcon (IMG,/icons/image.png) .gif .jpg .png +AddIcon /icons/dir.png ^^DIRECTORY^^ +AddIcon /icons/backup.png *~+
AddIconByType
should be used in preference to AddIcon
,
@@ -362,6 +389,7 @@ content-encoding
This sets the icon to display next to files with FancyIndexing
.
Icon is either a (%-escaped) relative URL to the icon,
+ a fully qualified remote URL,
or of the format (alttext,url)
where alttext is the text tag given for an icon for
non-graphical browsers.
MIME-encoding is a valid content-encoding, such as
x-compress
.
- AddIconByEncoding /icons/compress.xbm x-compress
-
AddIconByEncoding /icons/compress.png x-compress+
This sets the icon to display next to files of type
MIME-type for FancyIndexing
.
Icon is either a (%-escaped) relative URL to the icon,
+ a fully qualified remote URL,
or of the format (alttext,url)
where alttext is the text tag given for an icon for
non-graphical browsers.
MIME-type is a wildcard expression matching required the mime types.
-
- AddIconByType (IMG,/icons/image.xbm) image/*
-
AddIconByType (IMG,/icons/image.png) image/*+ @@ -414,11 +441,11 @@ configured
The DefaultIcon
directive sets the icon
to display for files when no specific icon is known, for FancyIndexing
.
- Url-path is a (%-escaped) relative URL to the icon.
DefaultIcon /icon/unknown.png-
- DefaultIcon /icon/unknown.xbm
-
- HeaderName HEADER.html
-
HeaderName HEADER.html+
Both HeaderName and ReadmeName
now treat
@@ -446,9 +472,8 @@ of the index listing
access the directory being indexed. If Filename begins
with a slash, it will be taken to be relative to the DocumentRoot
.
- HeaderName /include/HEADER.html
-
HeaderName /include/HEADER.html+
Filename must resolve to a document with a major
content type of text/*
(e.g.,
@@ -457,9 +482,8 @@ of the index listing
actual file type (as opposed to its output) is marked as
text/html
such as with a directive like:
- AddType text/html .cgi
-
AddType text/html .cgi+
Content negotiation
will be performed if Options
@@ -477,6 +501,10 @@ of the index listing
+SuppressHTMLPreamble, so that these tags are not
repeated.
ReadmeName
The IndexHeadInsert
directive specifies a
string to insert in the <head> section of the HTML
generated for the index page.
-
- IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
-
IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"+
IndexIgnore file [file] ...
IndexIgnore "."
.
(the current
directory).
-
- IndexIgnore README .htaccess *.bak *~
-
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t+ + +
This directive does not currently work in configuration sections
+ that have regular expression arguments, such as <DirectoryMatch>
+
Description: | Empties the list of files to hide when listing +a directory |
---|---|
Syntax: | IndexIgnoreReset ON|OFF |
Context: | server config, virtual host, directory, .htaccess |
Override: | Indexes |
Status: | Base |
Module: | mod_autoindex |
Compatibility: | 2.3.10 and later |
The IndexIgnoreReset
directive removes
+ any files ignored by IndexIgnore
otherwise
+ inherited from other configuration sections.
<Directory "/var/www"> + IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t +</Directory> +<Directory "/var/www/backups"> + IndexIgnoreReset ON + IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t +</Directory>+ + +
Review the default configuration for a list of + patterns that you might want to explicitly ignore after using this + directive.
IndexOptions [+|-]option [[+|-]option]
...
By default, no options are enabled.
IndexOptions HTMLTable
+ is in effect and an IndexStyleSheet
is defined.
+ Rather than the standard even
and odd
+ classes that would otherwise be applied to each row of the table,
+ a class of even-ALT
or
+ odd-ALT
where ALT is either the
+ standard alt text associated with the file style (eg. snd,
+ txt, img, etc) or the alt text defined by one of
+ the various AddAlt*
directives.
+ Charset
keyword allows you to
specify the character set of the generated page. The
- default is either ISO-8859-1 or UTF-8,
- depending on whether the underlying file system is unicode
- or not.
+ default is UTF-8
on Windows and Mac OS X,
+ and ISO-8859-1
elsewhere.
+ (It depends on whether the underlying file system
+ uses Unicode filenames or not.)
-
- IndexOptions Charset=UTF-8
-
IndexOptions Charset=UTF-8-
Type
keyword allows you to
- specify the MIME content-type of the generated page. The default
- is text/html.
-
-
- IndexOptions Type=text/plain
-
DescriptionWidth
keyword allows you to
specify the width of the description column in
characters.-DescriptionWidth
(or unset) allows
- mod_autoindex
to calculate the best width.-DescriptionWidth
(or unset) allows
+ mod_autoindex
to calculate the best width.DescriptionWidth=n
fixes the column width to
n bytes wide.DescriptionWidth=*
grows the column to the
width necessary to accommodate the longest description
- string.AddDescription
for dangers
+ See the section on AddDescription
for dangers
inherent in truncating descriptions.FoldersFirst
is enabled, subdirectory
Zed
will be listed before subdirectory
Beta
, which will be listed before normal files
- Gamma
and Alpha
. This option
- only has an effect if FancyIndexing
is also enabled.Gamma
and Alpha
.
+ This option only has an effect if FancyIndexing
+ is also enabled.
+
- FancyIndexing
constructs
- a simple table for the fancy directory listing. Note this will
- confuse older browsers. It is particularly necessary if file
+ FancyIndexing
constructs
+ a simple table for the fancy directory listing.
+ It is necessary for utf-8 enabled platforms or if file
names or description text will alternate between
- left-to-right and right-to-left reading order, as can happen
- on WinNT or other utf-8 enabled platforms.FancyIndexing
is also enabled.
+
+
NameWidth
keyword allows you to specify the width
of the filename column in bytes.-NameWidth
(or unset) allows mod_autoindex
to calculate the best width.-NameWidth
(or unset) allows mod_autoindex
to calculate the best width, but only up
+ to 20 bytes wide.NameWidth=n
fixes the column width to
n bytes wide.HTTP_UNAUTHORIZED
or
HTTP_FORBIDDEN
IndexOptions
- IgnoreClient
in Apache 2.0.23.IndexOptions
+ IgnoreClient
.AddDescription
for information about setting the file
description. See also the DescriptionWidth
- index option to limit the size of the description column.
+ index option to limit the size of the description column.
+
+ This option
+ only has an effect if FancyIndexing
is also enabled.
+
ReadmeName
, and if that file
+ exists, The closing </body></html> tags are also
+ ommitted from the output, under the assumption that you'll likely
+ put those closing tags in that file.
- SuppressIcon
and
@@ -727,24 +800,36 @@ indexing
FancyIndexing
is also enabled.
+
hr
elements) in directory listings. Combining both SuppressIcon
and
SuppressRules
yields proper HTML 3.2 output, which
by the final specification prohibits img
and
hr
elements from the pre
block (used to
- format FancyIndexed listings.)FancyIndexing
is also enabled.
+
+
FancyIndexing
is also enabled.
+ Last-Modified
and ETag
values for the listed directory in the HTTP header. It is only valid
@@ -760,8 +845,19 @@ indexing
Last-Modified
header on all Unix platforms.
If this is a concern, leave this option disabled.Type
keyword allows you to
+ specify the MIME content-type of the generated page. The default
+ is text/html.
+
+ IndexOptions Type=text/plain+ +
VersionSort
keyword causes files containing
version numbers to sort in a natural way. Strings are sorted as
@@ -789,37 +885,37 @@ indexing
XHTML
keyword forces mod_autoindex
- to emit XHTML 1.0 code instead of HTML 3.2.FancyIndexing
is also enabled.
+
+
Apache 1.3.3 introduced some significant changes in the
- handling of IndexOptions
directives. In
- particular:
Be aware of how multiple IndexOptions
are
+ handled.
IndexOptions
directives for a
single directory are now merged together. The result of:
-
- <Directory /foo>
-
- IndexOptions HTMLTable
- IndexOptions SuppressColumnsorting
-
- </Directory>
-
<Directory "/foo"> + IndexOptions HTMLTable + IndexOptions SuppressColumnsorting +</Directory>+
will be the equivalent of
-
- IndexOptions HTMLTable SuppressColumnsorting
-
IndexOptions HTMLTable SuppressColumnsorting+
- IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
- IndexOptions +SuppressSize
-
IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing+
+IndexOptions +SuppressSize
The net effect is equivalent to IndexOptions FancyIndexing
+SuppressSize
, because the unprefixed FancyIndexing
@@ -876,10 +971,12 @@ Name|Date|Size|Description
and identifies the primary key. The secondary key is
always the ascending filename.
You can force a directory listing to only be displayed in a
- particular order by combining this directive with the SuppressColumnSorting
index option; this will prevent
- the client from requesting the directory listing in a different
- order.
You can, if desired, prevent the client from reordering the list
+ by also adding the SuppressColumnSorting
+ index option to remove the sort link from the top of the column,
+ along with the IgnoreClient
index
+ option to prevent them from manually adding sort options to the
+ query string in order to override your ordering preferences.
The IndexStyleSheet
directive sets the name of
the file that will be used as the CSS for the index listing.
-
- IndexStyleSheet "/css/style.css"
-
IndexStyleSheet "/css/style.css"+
Using this directive in conjunction with IndexOptions
- HTMLTable
also adds ai-tr-odd
and
- ai-tr-even
class declarations to alternating rows of
- the directory listing table, so that you can style alternate rows of
- the table differently.
indexlist
and the
+ following classes are associated with the various parts of the
+ listing:
+
+ Class | Definition |
---|---|
tr.indexhead | Header row of listing |
th.indexcolicon and td.indexcolicon | Icon column |
th.indexcolname and td.indexcolname | File name column |
th.indexcollastmod and td.indexcollastmod | Last modified column |
th.indexcolsize and td.indexcolsize | File size column |
th.indexcoldesc and td.indexcoldesc | Description column |
tr.breakrow | Horizontal rule at the bottom of the table |
tr.odd and tr.even | Alternating even and odd rows |
DocumentRoot
.
-
- ReadmeName FOOTER.html
-
# Example 1 +ReadmeName FOOTER.html+ + +
# Example 2 +ReadmeName /include/FOOTER.html-
- ReadmeName /include/FOOTER.html
-
See also HeaderName
, where this behavior is described in greater
detail.