Help Force file download instead of open in browser On Apache2

Milagro

Senior Member
Joined
Sep 17, 2016
Messages
852
Reaction score
153
I have tired all i can but is not working out , and i have used this:

<FilesMatch "\.(mov|mp3|jpg|png|pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>

pls if theres any other way to get it done please help
 
I have tired all i can but is not working out , and i have used this:

<FilesMatch "\.(mov|mp3|jpg|png|pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>

pls if theres any other way to get it done please help
Your content disposition header is not being served properly. You need to use the filename too.

Header set "Content-disposition" "attachment; filename=<yourfilename>"

You need to figure out a way to configure the filename dynamically in your .htaaccess config.
 
Your content disposition header is not being served properly. You need to use the filename too.

Header set "Content-disposition" "attachment; filename=<yourfilename>"

You need to figure out a way to configure the filename dynamically in your .htaaccess config.
i run an mp3 download site and all the mp3 files are in my folder, how will i go about it
 
Back
Top