From: Rich Bowen
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
+ -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>
+
+