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

Author: Zeeshan Arshad     1292     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 technical multipotentialite entrepreneur and expert in making custom apps/cms/tools.

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

Story  LinkedIn Profile  Courses  YouTube