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

Author: Zeeshan Arshad     1180     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 is a multi-talented serial freelacncer, specialist in custom apps/cms/automation scripts and online instructor.

Feel free to contact him with your clear message or problem.

Story  LinkedIn Profile  Courses  YouTube