httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] FallbackResource
Date Mon, 19 May 2014 19:10:34 GMT
On Mon, 2014-05-19 at 14:20 -0400, Thomas E. Davis wrote:
> I either have a problem with the use of the FallbackResource directive
> or I do not understand how it is designed to work.

Somewhere between those two, perhaps.

>   All existing static content requests still get served as expected
> and all non-existing non-php requests get properly redirected to
> index.php. However, all requests for non existing php files just
> return a 404 error. If I understand the design intent correctly, they
> should get redirected to index.php.

You've configured PHP to handle all .php requests, right?

FallbackResource only activates when no (other) handler deals
with a request.  PHP has handled the request, and returned the 404.
Since that 404 is coming from a handler that's supposed to know
what it's doing, Fallback is not required so no FallbackResource

PHP could fix that by declining to handle requests for nonexistent
scripts (for mod_php I'd expect that to be a one-line patch).
That would hand responsibility back to the server, so FallbackResource
would work as you expect.

Apache can't second-guess PHP without breaking things horribly
when PHP (or other handler) deliberately returns an error status
such as 404.

> I have unsuccessfully Googled

Maybe this'll help the next person who googles it :)

Nick Kew

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message