.htaccess Force Files to Download (Not Open in Browser)

Author: Zeeshan Arshad     1374     09/25/2015

Estimated reading time: 0 minutes, 12 seconds

You can force files to download by adding following code into .htaccess file. Add more extensions if needed.

AddType application/octet-stream .csv
AddType application/octet-stream .xls
AddType application/octet-stream .doc
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .mov
AddType application/octet-stream .pdf


Was this topic helpful?

Yes
No
Subscribe YouTube Channel

Zeeshan Arshad is a multipotentialite web developer who also happens to know about growth hacking, blogging, closing, marketing, copywriting, spirituality, virtual reality and more. Zeeshan is a Freelancer Top Contributor, vWorker Top Coder and Udemy Premium Instructor.

Story  LinkedIn Profile  Courses  YouTube