Making ALL files in a directory available for download through a "save-as" dialog box
Posted on 2004-08-12
I have a number of files in my "/files" directory that I would like to make available for download, through links on my site.
Some are ZIP files, some are word documents, some are images and some are HTML documents.
As it is right now, if someone clicks on a link to a ZIP file, a dialog box asks them if they wish to save the file to disk. But if they click on an image or an HTML document, it opens it up in the browser. I want this dialog box for ALL files in the /files directory, not just for applications.
Can I do this by controlling headers with .htaccess? If so, how?