error_page and named locations
    mike 
    mike503 at gmail.com
       
    Thu Dec 11 21:51:59 MSK 2008
    
    
  
 Thu, Dec 11, 2008 at 4:31 AM, Igor Sysoev <is at rambler-co.ru> wrote:
>      location / {
>          file_match  $uri  @drupal;
>          # the same as
>          #    error_page  404 = @drupal; log_not_found off;
>      }
This is a very common example - almost anything with "nice names" will
pass the non-existent file requests to a single file handler. That's
how we're designing our own application too (and how I design mine
nowadays)
Is there a reason that a new parameter would need to be invented? Why
is error_page not capable of this? (Note that I was using error_page
in my 0.7.21 or so and the POST data was not coming through to my
PHP/fastcgi scripts, which I thought was fixed a long while back) so
I've been using if (-f $request_filename) for the time being (I don't
want to test for dirs, only exact filenames, otherwise index files get
factored in and I don't want those to be used actually, and I can't
rename them right now)
If this new parameter is affecting only fastcgi-based requests I would
request it be prefixed with fastcgi_ at least for consistency (maybe
fastcgi_fallback_pass or something?). If it is general purpose,
file_try_match maybe. This is hard :)
    
    
More information about the nginx
mailing list