Not existant files passed to php backend

Igor Sysoev is at
Wed Aug 20 22:38:52 MSD 2008

On Wed, Aug 20, 2008 at 08:26:55PM +0200, Rob Schultz wrote:

> Igor Sysoev wrote:
> > On Wed, Aug 20, 2008 at 07:28:58PM +0300, Reinis Rozitis wrote:
> > 
> >> 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".
> Hi Igor, just curious i am not a regex expert or anything. What is the 
> difference between the one you have listed here "location *~ \.php$" and 
> then one i am currently using "location ~ .*\.php$"?

There is no diffference between "\.php$" and ".*\.php$" regexs.
The former probably more optimal, but I'm not sure: PCRE may optimize
the later and produce the same code as for the former.

As to "location *~" vs "location ~", the "*~" is case-insensetive regex.

Igor Sysoev

More information about the nginx mailing list