download .pdf files from your website

If you want to allow visitors to download the pdfs rather than have them rendered here’s a quick howto

in the virtualhost section for the domain add:

SetEnvIf Request_URI "\.pdf$" requested_pdf=pdf
Header add Content-Disposition "attachment" env=requested_pdf

That’s it all pdfs on that domain will be offered for download.

Leave a Reply

Your email address will not be published. Required fields are marked *