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";
}



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章