Hi,
I have a site with 2 pdf-forms. I'd like to force the browser to download them instead of opening in the browser window.
Site runs on apache with nginx proxy.
In the folder containing the 2 files I have this .htaccess:
Code:
<Files *.pdf>
ForceType applicaton/octet-stream
Header set Content-Disposition attachment
</Files>
the nginx virtualhostfile has
l
Code:
ocation ~* ^.+\.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|bz2|pdf|odt|txt|tar|bmp|rtf|js|swf|avi|mp4|mp3|ogg|flv)
(\?.*)?$ {
expires 30d; #adjust to your static content's update frequency
root /sites/public_html;
}
location ~ /\.ht { deny all; }
}
However, the browser keeps on opening the file instead of downloading it