However I'm a little concerned about your use of uppercase PDF.
-> http://www.thingy-ma-jig.co.uk/blog/06-08-2007/force-a-pdf-to-download
Bob
![]() | Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years. Thanks, CNET Support |
I was hoping someone could help me out here. I just created a new webpage with hostgator and I placed a .htaccess file in the public_html folder to force download of a pdf. For some reason it's not working. I've used the exact same .htaccess file on a webpage through hostgator a couple of years ago and it worked perfectly back then. Here is the script in the file:
<Files *.PDF>
ForceType application/pdf
Header set Content-Disposition attachment
</Files>
I've also tried:
AddType application/octet-stream .pdf
What could be wrong? The directory setup of my webpage files? Some sort of conflict between the webpage html and this .htaccess file?
Any help on this would be much appreciated. I just spent half a day yesterday looking for answers to this with no luck.
Discussion is locked