Nginx sub-directory setting Chinese path problem, sub-path mapping configuration must be root plus wildcard sub-path specified, and variable splicing cannot be used to jump

Nginx sub-directory setting Chinese path problem, sub-path mapping configuration must be root plus wildcard sub-path specified, and variable splicing cannot be used to jump
只能用
loacation ~ ^/down/(.)${
root "D:/downloadfile;"
set $file_url $1;
if ($query_string ~
^(.)action=down\b|download\b(.)$ ){
add_header Content-Disposition "attachment; filename=$1";
}
}
charset utf-8;

不能直接用
set $file_url $1;
if ($query_string ~ ^(.)action=down\b|download\b(.*)$ ){
add_header Content-Disposition "attachment; filename=$1";
}

Guess you like

Origin blog.51cto.com/13243359/2601955