httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r1055866 - /httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml
Date Thu, 06 Jan 2011 13:33:36 GMT
Author: rbowen
Date: Thu Jan  6 13:33:35 2011
New Revision: 1055866

URL: http://svn.apache.org/viewvc?rev=1055866&view=rev
Log:
Sync with the much better explanation and example in trunk.

Modified:
    httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml?rev=1055866&r1=1055865&r2=1055866&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_dir.xml Thu Jan  6 13:33:35 2011
@@ -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>
 



Mime
View raw message