Underscore between variables

Francis Daly francis at daoine.org
Fri Sep 26 14:11:19 UTC 2014


On Fri, Sep 26, 2014 at 09:43:59AM -0400, jamel wrote:

Hi there,

> 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_.

Does it?

Or does it try to use variables arg_x_ and arg_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.

Yes. Curly brackets.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list