I noticed that if I use this in my config then shipped/Dir 1/file.exe returns file not found in browser and shipped/dir/file.exe still returns proper file extension (exe, etc) but contains the html content of the download page.
location = /files {
root /home/mysite/public_html/shipped;
internal;
add_header Content-Disposition attachment;
}
header("X-Accel-Redirect: /files/" . $path);
While removing that and using "header("X-Accel-Redirect: /shipped/" . $path);" the actual file location works for shipped/Dir 1/file.exe but not for shipped/dir/file.exe.
I'm at a lose as to why it's not working properly.