Commit a92dd03a authored by Richard Bowen's avatar Richard Bowen
Browse files

Sync with the much better explanation and example in trunk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1055866 13f79535-47bb-0310-9956-ffa450edef68
parent a80a8aa4
Loading
Loading
Loading
Loading
+26 −2
Changes for docs/manual/mod/mod_dir.xml: 26 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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>