Welcome! Log In Create A New Profile

Advanced

Re: X-accel-redirect serving html download page instead of file.

August 27, 2012 11:02PM
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.
SubjectAuthorPosted

X-accel-redirect serving html download page instead of file.

wideawakeAugust 27, 2012 09:29PM

Re: X-accel-redirect serving html download page instead of file.

Justin DorfmanAugust 27, 2012 09:58PM

Re: X-accel-redirect serving html download page instead of file.

wideawakeAugust 27, 2012 10:05PM

Re: X-accel-redirect serving html download page instead of file.

Justin DorfmanAugust 27, 2012 10:32PM

Re: X-accel-redirect serving html download page instead of file.

wideawakeAugust 27, 2012 11:02PM

Re: X-accel-redirect serving html download page instead of file.

Maxim DouninSeptember 03, 2012 02:32PM

Re: X-accel-redirect serving html download page instead of file.

poulphunterDecember 04, 2012 09:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 89
Record Number of Users: 5 on December 17, 2014
Record Number of Guests: 154 on December 17, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready