Nginx子目录设定中文路径问题,子路径映射配置必须为root加通配符子路径指定,不能用变量拼接跳转

Nginx子目录设定中文路径问题,子路径映射配置必须为root加通配符子路径指定,不能用变量拼接跳转
只能用
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";
}

猜你喜欢

转载自blog.51cto.com/13243359/2601955