URI pattern baffling problem

Igor Sysoev igor at sysoev.ru
Tue Feb 8 16:11:41 MSK 2011


On Tue, Feb 08, 2011 at 11:55:27AM +0100, Gregory Agerba wrote:

> Thanks Antonio, now that worked.

You should think not in negative way:

if ($request_uri !~* "^/documents/(?:[A... ") {
{                                                                               
   rewrite ^ http://www.google.com/ permanent;                                  
}                                                                               

but in positive way:

location ~* "^/documents/(?:[A... " {
    ...
}

location / {
   rewrite ^ http://www.google.com/ permanent;                                  
}

> - Gregory
> 
> 2011/2/8 António P. P. Almeida <appa at perusio.net>
> 
> >
> > Try:
> > "^/documents/(?:[A-Z0-9-]{36})/pages/(?:[A-Z0-9-]{36})/items/(?:[A-Z0-9-]{36}"


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



More information about the nginx mailing list