mod_dir.xml revision c71d76178cda93ed4f5ae4098b03f1533aede614
24fed8aca238e6878aa9c85c82e83a0a7ee3ced3Timo Sirainen<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
32f02789693d38b5470f0406bda0cbdf6fc1560eTimo Sirainen<!-- $LastChangedRevision$ -->
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen Licensed to the Apache Software Foundation (ASF) under one or more
17fc2a887a5683b2e1bbd6bd9fdf0cdb97b509fbTimo Sirainen contributor license agreements. See the NOTICE file distributed with
32f02789693d38b5470f0406bda0cbdf6fc1560eTimo Sirainen this work for additional information regarding copyright ownership.
78919bf7cb55e84e5f289f33526579f63c4797d7Timo Sirainen The ASF licenses this file to You under the Apache License, Version 2.0
3a916a3c77a476a799425b958a0ac83b93808088Timo Sirainen (the "License"); you may not use this file except in compliance with
379175cfba8150d481d9898b78330b719d128d84Timo Sirainen the License. You may obtain a copy of the License at
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen Unless required by applicable law or agreed to in writing, software
32f02789693d38b5470f0406bda0cbdf6fc1560eTimo Sirainen distributed under the License is distributed on an "AS IS" BASIS,
8e0e5842b5841cf3065ed18e8ba093b11517c51dTimo Sirainen WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8e0e5842b5841cf3065ed18e8ba093b11517c51dTimo Sirainen See the License for the specific language governing permissions and
8e0e5842b5841cf3065ed18e8ba093b11517c51dTimo Sirainen limitations under the License.
f052a448696b1246ee9fc36b7c727237aed56058Timo Sirainen<description>Provides for "trailing slash" redirects and
8e0e5842b5841cf3065ed18e8ba093b11517c51dTimo Sirainen serving directory index files</description>
6649a54aca033fcbbbb73e5999b95b828bd6b54cTimo Sirainen <p>The index of a directory can come from one of two sources:</p>
17fc2a887a5683b2e1bbd6bd9fdf0cdb97b509fbTimo Sirainen <li>A file written by the user, typically called
d9e404180ff26dbbaea68534a5f176765022b76bTimo Sirainen <code>index.html</code>. The <directive module="mod_dir"
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen >DirectoryIndex</directive> directive sets the
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen name of this file. This is controlled by
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen <li>Otherwise, a listing generated by the server. This is
a7c6667c80d7363f5110ec1ab1ae9198833411d3Timo Sirainen provided by <module>mod_autoindex</module>.</li>
52cb31b413be19de11cdf9ad84b9ccde7740b5cfTimo Sirainen <p>The two functions are separated so that you can completely
52cb31b413be19de11cdf9ad84b9ccde7740b5cfTimo Sirainen remove (or replace) automatic index generation should you want
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen <p>A "trailing slash" redirect is issued when the server
8d3278a82b964217d95c340ec6f82037cdc59d19Timo Sirainen receives a request for a URL
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen <code>http://servername/foo/dirname</code> where
447e086422f1ab7cc16833583ed70a4af7a84bc5Timo Sirainen <code>dirname</code> is a directory. Directories require a
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen trailing slash, so <module>mod_dir</module> issues a redirect to
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen <code>http://servername/foo/dirname/</code>.</p>
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen<directivesynopsis>
DirectoryIndex index.html
DirectoryIndex index.html
DirectoryIndex index.php
# In this example, only index.php will remain as an index resource.
DirectoryIndex index.html
DirectoryIndex index.php
<li><code>seeother</code> : issues a 303 redirection (also known as "See Other") to the index resource.</li>
FallbackResource /not-404.php
FallbackResource /index.php