captures in regex locations

Igor Sysoev is at rambler-co.ru
Thu Mar 5 00:40:58 MSK 2009


On Wed, Mar 04, 2009 at 01:34:35PM -0800, Merlin wrote:

> Igor,
> 
> This is awesome, and I look forward to playing with it.  I assume this is
> presented as a patch for testing but is planned to be released at some point
> later, correct?  Regardless, keep up the great work!

Yes, I plan to include t in 0.7.40.

> - Merlin
> 
> On Wed, Mar 4, 2009 at 1:01 PM, Igor Sysoev <is at rambler-co.ru> wrote:
> 
> > The patch against 0.7.39 to support
> >
> > 1) captures in regex location
> > 2) an "alias" inside these locations
> >
> >   location ~* ^/files/(.+\.(?:gif|jpe?g|png))$ {
> >
> >       alias   /path/to/$1;
> >   }
> >
> > 3) captures became global and may be used as variables in some directives:
> >
> >   location ~* ^/files/(.+\.(?:gif|jpe?g|png))$ {
> >
> >       error_page  404  /index.php?img=$1;
> >   }


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





More information about the nginx mailing list