How to Force download Mp3/Mov (or any other files) when hyperlink

Tag: |   Category:

When you hyperlink mp3 file or mov file it open/play in a browser and sometimes you wanted to make this mp3 file as downloadable file. In this case open your .htaccess file and insert below code, this small code will force your mp3 file link as downloadable file.


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

Copyright © 2024 Siam Naulak.
magnifiercrossmenu