Force download in apache


Written on February 27, 2008 – 12:31 am | by Rene

if you want to force certain kind of files to pop up the save as dialog box, you have to add the AddType directive with the value application/octet-stream to the .htaccess file like this:

  1.  
  2. AddType application/octet-stream .csv
  3. AddType application/octet-stream .xls
  4. AddType application/octet-stream .doc
  5. AddType application/octet-stream .avi
  6. AddType application/octet-stream .mpg
  7. AddType application/octet-stream .mov
  8. AddType application/octet-stream .pdf
  9.  

and that’s all, now everything works fine

Post a Comment