Loading docs/manual/mod/mod_dir.xml +26 −2 Changes for docs/manual/mod/mod_dir.xml: 26 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -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> <Directory /web/example.com/htdocs/blog><br /> <indent> FallbackResource /blog/index.php<br /> </indent> </Directory> </code> </example> </usage> </directivesynopsis> Loading Loading
docs/manual/mod/mod_dir.xml +26 −2 Changes for docs/manual/mod/mod_dir.xml: 26 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -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> <Directory /web/example.com/htdocs/blog><br /> <indent> FallbackResource /blog/index.php<br /> </indent> </Directory> </code> </example> </usage> </directivesynopsis> Loading