]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Sync with the much better explanation and example in trunk.
authorRich Bowen <rbowen@apache.org>
Thu, 6 Jan 2011 13:33:35 +0000 (13:33 +0000)
committerRich Bowen <rbowen@apache.org>
Thu, 6 Jan 2011 13:33:35 +0000 (13:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1055866 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_dir.xml

index 0682d4fd09f18a9ada7c82da72d16b3380f10beb..8c7fc0f395e254cd31a9bcac74152720875cb646 100644 (file)
@@ -164,11 +164,35 @@ a directory</description>
     in your filesystem, and would otherwise return HTTP 404 (Not Found).
     For example</p>
     <example>
-        <code>FallbackResource default.php</code>
+        <code>FallbackResource /not-404.php</code>
     </example>
     <p>will cause requests for non-existent files to be handled by
-    <code>default.php</code>, while requests for files that exist
+    <code>not-404.php</code>, while requests for files that exist
     are unaffected.</p>
+    <p>It is frequently desirable to have a single file or resource
+    handle all requests to a particular directory, except those requests
+    that correspond to an existing file or script. This is often
+    referred to as a 'front controller.'</p>
+    <p>In earlier versions of httpd, this effect typically required
+    <module>mod_rewrite</module>, 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>
+    <example>
+        <code>FallbackResource /index.php</code>
+    </example>
+    <p>Existing files, such as images, css files, and so on, will be
+    served normally.</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>
+    <example>
+         <code>
+             &lt;Directory /web/example.com/htdocs/blog&gt;<br />
+            <indent>
+                  FallbackResource /blog/index.php<br />
+             </indent>
+             &lt;/Directory&gt;
+         </code>
+    </example>
 </usage>
 </directivesynopsis>