Forced download of a file with .htaccess


/ Published in: Apache
Save to your folder(s)

To force the user to download certain filetypes in the current directory.


Copy this code and paste it in your HTML
  1. <Files *.*>
  2. ForceType application/octet-stream
  3. Header set Content-Disposition attachment
  4. </Files>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.