beta.blog

Linux (Ubuntu)

.htaccess – Force file download

by 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 😉

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!