URI pattern baffling problem

Gregory Agerba gregory.agerba at gmail.com
Tue Feb 8 16:20:00 MSK 2011


Hi Igor,

Yes, but my rule is only acting as a simple *Access Control List* which
expect a very special pattern to match and anything else should be discarded
with an error message/page.

The given pattern is not accessed directly by users, it’s an application
that send requests to that given URI-pattern and if the pattern doesn’t
match (thus in my case it means it's a valid request), then the request is
processed further in Passenger.

In my understanding if I am supposed to send the positive matching I should
forward that somewhere and I will create a loop and this explains why I do
the opposite here.

Gregory


2011/2/8 Igor Sysoev <igor at sysoev.ru>

>
> 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;
> }
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110208/cb2e5f09/attachment.html>


More information about the nginx mailing list