[thelist] Stop Word, Excel, PDF loading into browser

Anthony Baratta Anthony at Baratta.com
Mon, 20 Dec 1999 15:33:42 -0800


Oliver Lineham wrote:
> 
> Hi all,
> 
> Is it possible to provide Word (.doc), Excel (.xls), and PDF documents for
> download/save, rather than display within the browser chrome?


Oliver....

You didn't say what server you are using. With Apache....

Create a '.htaccess' file and put the following in it:
  AddType applications/octet-stream .doc .xls .pdf

Save this file in the sub directory that holds the files. Or save it in
the web root directory. .htaccess files affect the directory it's in and
all directories underneath it.

More info:
  http://www.apache.org/docs/mod/mod_mime.html#addtype

-- 
Anthony Baratta