rewrite or internal redirection cycle

Igor Sysoev is at rambler-co.ru
Sun Jul 29 14:33:09 MSD 2007


On Sun, Jul 29, 2007 at 12:25:31PM +0200, Roxis wrote:

> On Sunday 29 July 2007, Igor Sysoev wrote:
> > Could you show debug log ?
> 
> # config 1 (server level)
> rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3   last;
> return  403;
> 
> # config 2 (server level)
> rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3   break;
> return  403;
> 
> # config 3
> location / {
>     rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3   last;
>     return  403;
> }
> 
> # config 4
> location / {
>     rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3   break;
>     return  403;
> }

This is because you have no location that matches request and
request against server level rewrite rules: it does not match regex and
goes to "return 403".


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





More information about the nginx mailing list