Forum Moderators: phranque
We're having strange problems with dowloading a pdf on Windows. NB: everything works fine on Mac.
What happens, try to download a PDF, resulting error message: File does not begin with '%pdf'
OK, check adobe forums, results in this page:
[adobeforums.com...]
We have eliminated these causes, yet the problem still remains on Windows only.
We realise all pdf's in same folder have the same problem - there is a .htaccess file with rewrite cond's and rules that keep the pdf's hidden from the site that it is on, but allows our other site to access it.
We turn the rewrite engine off, and everything works perfectly. Strange as everything was working perfectly on the Mac.
Does anybody have any ideas that we can try or why this might be happening? I have even gone as far as forcing the mime-type with not much luck...
there is a .htaccess file with rewrite cond's and rules that keep the pdf's hidden[
We turn the rewrite engine off, and everything works perfectly
You might want to post the rewrite rule(s) that protect your pdf files (after snipping out real domain names) - something is going wrong that causes the downloaded content to not begin with "%PDF". A normal pdf file begins with "%PDF-" followed by major and minor version numbers, e.g. "PDF-1.2". So possibly, your server is prepending a header (or something) on the file contents. You might also want to check it by manually requesting the file with wannabrowser or similar, and looking at the raw server response. Perhaps a Mac can handle it or is more forgiving.
Jim