Re: FallbackResource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux