From: Rich Bowen Date: Thu, 6 Jan 2011 13:33:35 +0000 (+0000) Subject: Sync with the much better explanation and example in trunk. X-Git-Tag: 2.2.18~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4c174abf294af34bb03980de7b15499f3d9f1ce;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml index 0682d4fd09f..8c7fc0f395e 100644 --- a/docs/manual/mod/mod_dir.xml +++ b/docs/manual/mod/mod_dir.xml @@ -164,11 +164,35 @@ a directory in your filesystem, and would otherwise return HTTP 404 (Not Found). For example

- FallbackResource default.php + FallbackResource /not-404.php

will cause requests for non-existent files to be handled by - default.php, while requests for files that exist + not-404.php, while requests for files that exist are unaffected.

+

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.'

+

In earlier versions of httpd, this effect typically required + mod_rewrite, and the use of the -f and + -d tests for file and directory existence. This now + requires only one line of configuration.

+ + FallbackResource /index.php + +

Existing files, such as images, css files, and so on, will be + served normally.

+

In a sub-URI, such as http://example.com/blog/ this + sub-URI has to be supplied as local-url:

+ + + <Directory /web/example.com/htdocs/blog>
+ + FallbackResource /blog/index.php
+
+ </Directory> +
+