Location problems

Igor Sysoev is at rambler-co.ru
Sat Mar 1 10:47:48 MSK 2008


On Fri, Feb 29, 2008 at 11:20:42PM -0800, Cliff Wells wrote:

> 
> On Fri, 2008-02-29 at 14:31 +0300, Igor Sysoev wrote:
> 
> >         location / {
> >             error_page  404 = @fallback;
> >         }
> > 
> >         location @fallback {
> >             fastcgi_pass   ...
> >             fastcgi_param  SCRIPT_FILENAME  /path/to/frontend.php;
> >             fastcgi_param  QUERY_STRING     control_path=$uri;
> >             ...
> >         }
> 
> Igor, 
> 
> I've seen you use the "@" prefix on locations in several examples you've
> given people.  Is this just a notation you prefer or does it have some
> significance?

Yes, these are named locaitons, they had appeared in 0.6.6 and 0.5.31.
The main feature - while internal redirect via error_page $uri is not
changed, so they are handily to use in fallback handlers.

The named locaiton are always internal and do not intersect with site's URI
space.

In 0.6.27 post_action will support named location too.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list