file tests in subfolder and rewriting

Boris Bartsyts bartzitz at
Tue Mar 13 18:31:07 MSK 2007


i can't make nginx check for existence on the file in a subfolder:

    if (-f /cache$request_filename) {
        rewrite ^(.*)$ /cache$1 break;

and with a variable:

    set $file /cache$request_filename;

    if (-f $file) {
        rewrite ^(.*)$ /cache$1 break;

both methods fail. i've tried to add nother / before $request_filename,
with no luck. ideas, anyone?


More information about the nginx mailing list