Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Underscore between variables (1 reply)

$
0
0
Hello,

I'm trying to rewrite URL with parameters x, y, z to filename by such template: file_{x}_{y}_{z}.txt

location /path {
rewrite ^ /path/file_$arg_x_$arg_y_$arg_z.txt break;
root /var/www;
}

But it is not working. Because nginx tries to use variables x_, y_.
How can I use underscore symbol to separate variables?

In bash there is curly brackets style for such cases: ${x}_${y}_${z}.
May be nginx has something special for this too.

--
Sergey Polovko

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>