Linux (Ubuntu)
.htaccess – Force file download
by admin on Jun.14, 2010, under Linux (Ubuntu)
If you would like to protect your server and restrict a directory for instance to execute PHP code, you can create a new .htaccess file and insert the following line into it :
ForceType applicaton/octet-stream
All requested files (also PHP files) will now get downloaded from the client, instead of being executed 😉