summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_dir.html.en
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2014-03-29 21:56:19 +0100
committerStefan Fritsch <sf@sfritsch.de>2014-03-29 21:56:45 +0100
commit2a463b3cd73c32ee9dcd508248d0194923f435f4 (patch)
tree2ff478255a77a55031056790918b6f983bb7b20a /docs/manual/mod/mod_dir.html.en
parent86d5cc79d9d6750da8771fdb0c9ab22c19b8ad45 (diff)
downloadapache2-upstream/2.4.9.tar.gz
Imported Upstream version 2.4.9upstream/2.4.9
Diffstat (limited to 'docs/manual/mod/mod_dir.html.en')
-rw-r--r--docs/manual/mod/mod_dir.html.en82
1 files changed, 53 insertions, 29 deletions
diff --git a/docs/manual/mod/mod_dir.html.en b/docs/manual/mod/mod_dir.html.en
index 8d6138ed..86d76253 100644
--- a/docs/manual/mod/mod_dir.html.en
+++ b/docs/manual/mod/mod_dir.html.en
@@ -9,7 +9,7 @@
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
-<script src="../style/scripts/prettify.js" type="text/javascript">
+<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
@@ -61,6 +61,7 @@
</div>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
+<li><img alt="" src="../images/down.gif" /> <a href="#directorycheckhandler">DirectoryCheckHandler</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#directoryindex">DirectoryIndex</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#directoryindexredirect">DirectoryIndexRedirect</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#directoryslash">DirectorySlash</a></li>
@@ -69,6 +70,34 @@
<ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="DirectoryCheckHandler" id="DirectoryCheckHandler">DirectoryCheckHandler</a> <a name="directorycheckhandler" id="directorycheckhandler">Directive</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Toggle how this module responds when another handler is configured</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DirectoryCheckHandler On|Off</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DirectoryCheckHandler Off</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dir</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.4.8 and later. Releases prior to 2.4 implicitly
+act as if "DirectoryCheckHandler Off" was specified.</td></tr>
+</table>
+ <p>The <code class="directive">DirectoryCheckHandler</code> directive determines
+ whether <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> should check for directory indexes or
+ add trailing slashes when some other handler has been configured for
+ the current URL. Handlers can be set by directives such as
+ <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code> or by other modules,
+ such as <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> during per-directory substitutions.
+ </p>
+
+ <p> In releases prior to 2.4, this module did not take any action if any
+ other handler was configured for a URL. This allows directory indexes to
+ be served even when a <code class="directive">SetHandler</code> directive is
+ specified for an entire directory, but it can also result in some conflicts
+ with modules such as <code class="directive">mod_rewrite</code>.</p>
+
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="DirectoryIndex" id="DirectoryIndex">DirectoryIndex</a> <a name="directoryindex" id="directoryindex">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>List of resources to look for when the client requests
@@ -92,9 +121,7 @@ a directory</td></tr>
set, the server will generate its own listing of the
directory.</p>
- <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
- DirectoryIndex index.html
- </pre>
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">DirectoryIndex index.html</pre>
</div>
<p>then a request for <code>http://example.com/docs/</code> would
@@ -104,9 +131,7 @@ a directory</td></tr>
<p>Note that the documents do not need to be relative to the
directory;</p>
- <pre class="prettyprint lang-config">
- DirectoryIndex index.html index.txt /cgi-bin/index.pl
- </pre>
+ <pre class="prettyprint lang-config">DirectoryIndex index.html index.txt /cgi-bin/index.pl</pre>
<p>would cause the CGI script <code>/cgi-bin/index.pl</code> to be
@@ -122,8 +147,7 @@ a directory</td></tr>
directives within the <a href="../sections.html"><em>same context</em></a> will add
to the list of resources to look for rather than replace:
</p>
- <pre class="prettyprint lang-config">
-# Example A: Set index.html as an index page, then add index.php to that list as well.
+ <pre class="prettyprint lang-config"># Example A: Set index.html as an index page, then add index.php to that list as well.
&lt;Directory /foo&gt;
DirectoryIndex index.html
DirectoryIndex index.php
@@ -140,8 +164,7 @@ a directory</td></tr>
DirectoryIndex index.html
DirectoryIndex disabled
DirectoryIndex index.php
-&lt;/Directory&gt;
- </pre>
+&lt;/Directory&gt;</pre>
@@ -165,9 +188,18 @@ a directory</td></tr>
and returned transparently to the client. <code class="directive">DirectoryIndexRedirect</code> causes an external redirect
to instead be issued.</p>
- <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
- DirectoryIndexRedirect on
- </pre>
+ <p>The argument can be:</p>
+ <ul>
+ <li><code>on</code>: issues a 302 redirection to the index resource.</li>
+ <li><code>off</code>: does not issue a redirection. This is the legacy behaviour of mod_dir.</li>
+ <li><code>permanent</code>: issues a 301 (permanent) redirection to the index resource.</li>
+ <li><code>temp</code>: this has the same effect as <code>on</code></li>
+ <li><code>seeother</code>: issues a 303 redirection (also known as "See Other") to the index resource.</li>
+ <li><var>3xx-code</var>: issues a redirection marked by the chosen 3xx code.</li>
+ </ul>
+
+
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">DirectoryIndexRedirect on</pre>
</div>
<p>A request for <code>http://example.com/docs/</code> would
@@ -209,13 +241,11 @@ a directory</td></tr>
be aware that there are possible security implications to doing
this.</p>
- <pre class="prettyprint lang-config">
-# see security warning below!
+ <pre class="prettyprint lang-config"># see security warning below!
&lt;Location /some/path&gt;
DirectorySlash Off
SetHandler some-handler
-&lt;/Location&gt;
- </pre>
+&lt;/Location&gt;</pre>
<div class="warning"><h3>Security Warning</h3>
@@ -247,9 +277,7 @@ later</td></tr>
<p>Use this to set a handler for any URL that doesn't map to anything
in your filesystem, and would otherwise return HTTP 404 (Not Found).
For example</p>
- <pre class="prettyprint lang-config">
- FallbackResource /not-404.php
- </pre>
+ <pre class="prettyprint lang-config">FallbackResource /not-404.php</pre>
<p>will cause requests for non-existent files to be handled by
<code>not-404.php</code>, while requests for files that exist
@@ -262,9 +290,7 @@ later</td></tr>
<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>, and the use of the <code>-f</code> and
<code>-d</code> tests for file and directory existence. This now
requires only one line of configuration.</p>
- <pre class="prettyprint lang-config">
- FallbackResource /index.php
- </pre>
+ <pre class="prettyprint lang-config">FallbackResource /index.php</pre>
<p>Existing files, such as images, css files, and so on, will be
served normally.</p>
@@ -272,14 +298,12 @@ later</td></tr>
if inheritance from a parent directory is not desired.</p>
<p>In a sub-URI, such as <em>http://example.com/blog/</em> this
<em>sub-URI</em> has to be supplied as <var>local-url</var>:</p>
- <pre class="prettyprint lang-config">
-&lt;Directory /web/example.com/htdocs/blog&gt;
+ <pre class="prettyprint lang-config">&lt;Directory /web/example.com/htdocs/blog&gt;
FallbackResource /blog/index.php
&lt;/Directory&gt;
&lt;Directory /web/example.com/htdocs/blog/images&gt;
FallbackResource disabled
-&lt;/Directory&gt;
- </pre>
+&lt;/Directory&gt;</pre>
</div>
@@ -308,7 +332,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_dir.html';
}
})(window, document);
//--><!]]></script></div><div id="footer">
-<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
+<p class="apache">Copyright 2014 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();