Not existant files passed to php backend

Igor Sysoev is at
Wed Aug 20 21:47:45 MSD 2008

On Wed, Aug 20, 2008 at 07:28:58PM +0300, Reinis Rozitis wrote:

> >No, they does not impact the perfomance, but they has many limits
> >and drawbacks.
> Seems like stumbled on one of those -  if (!-f $request_filename) { ... 
> doesnt take in note index directive files...
> Eg if you open  instead of the index.php the if() is hit 
> and in my case 404 returned :(
> Is this also expected that $request_filename doesnt containt the index file 
> if there is such in config and also on disk?

Yes, "if" (rewrite module) runs before index module, therefore "if" tests "/".
But if you place "if" inside "location *~ \.php$" (as it was already
suggested), then "if" will test already internally redirected "/index.php".

Igor Sysoev

More information about the nginx mailing list