Try_files doesn't work after $args rewite?

Hello

Directive try_files doesn’t work after rewriting $args:

location / {

remove auth key from query string

if ($args ~ ^(.)&?auth=[^&]+(.)) {
set $args “$1$2”;
}

try_files $uri $uri/ @webapp;
}

location @webapp {

send request to upstream

proxy_pass http://some_upstream;
}

Log:

2011/12/19 15:05:16 [error] 29913#0: *40 open()
“/var/www/sth/Rest.svc/event/5826710” failed (2: No such file or
directory), client: 172.16.16.81, server: epg.siol.tv, request: “GET
/sth/Rest.svc/event/5826710?auth=blahblahblah HTTP/1.1”, host:
epg.siol.tv

What am i doing wrong?

Best regards, Brane

Hello!

On Mon, Dec 19, 2011 at 03:11:06PM +0100, “Brane F. Gračnar” wrote:

try_files $uri $uri/ @webapp;
“/var/www/sth/Rest.svc/event/5826710” failed (2: No such file or
directory), client: 172.16.16.81, server: epg.siol.tv, request: “GET
/sth/Rest.svc/event/5826710?auth=blahblahblah HTTP/1.1”, host: “epg.siol.tv

What am i doing wrong?

Maxim D.