From a3e3a4e58dd8f7996be44fded6444c9a0625a7e5 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Mon, 4 Mar 2002 21:24:05 +0000 Subject: [PATCH] mod_dir xml conversion. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93706 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_dir.xml | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 docs/manual/mod/mod_dir.xml diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml new file mode 100644 index 0000000000..850aa63872 --- /dev/null +++ b/docs/manual/mod/mod_dir.xml @@ -0,0 +1,81 @@ + + + + +mod_dir +Provides for "trailing slash" redirects and + serving directory index files. +Base +mod_dir.c +dir_module + + +

The index of a directory can come from one of two sources:

+ +
    +
  • A file written by the user, typically called + index.html. The DirectoryIndex directive sets the + name of this file. This is controlled by + mod_dir.
  • + +
  • Otherwise, a listing generated by the server. This is + provided by mod_autoindex.
  • +
+

The two functions are separated so that you can completely + remove (or replace) automatic index generation should you want + to.

+ +

A "trailing slash" redirect is issued when the server + receives a request for a URL + http://servername/foo/dirname where + dirname is a directory. Directories require a + trailing slash, so mod_dir issues a redirect to + http://servername/foo/dirname/.

+
+ + +List of resources to look for when the client requests +a directory +DirectoryIndex +DirectoryIndex + local-url [local-url] ... +DirectoryIndex index.html +server config +virtual host +directory +.htaccess + +Indexes + + +

The DirectoryIndex directive sets the + list of resources to look for, when the client requests an index + of the directory by specifying a / at the end of the a directory + name. Local-url is the (%-encoded) URL of a document on + the server relative to the requested directory; it is usually the + name of a file in the directory. Several URLs may be given, in + which case the server will return the first one that it finds. If + none of the resources exist and the Indexes option is + set, the server will generate its own listing of the + directory.

+ +Example +DirectoryIndex index.html + + +

then a request for http://myserver/docs/ would + return http://myserver/docs/index.html if it + exists, or would list the directory if it did not.

+ +

Note that the documents do not need to be relative to the + directory;

+ +DirectoryIndex index.html index.txt /cgi-bin/index.pl +

would cause the CGI script /cgi-bin/index.pl to be + executed if neither index.html or + index.txt existed in a directory.

+
+
+ +
\ No newline at end of file -- 2.50.1