How do I protect my digital files ?

If you are using an application like PHP-eSeller to sell digital files you need to make sure that your files are secure.

The best way to protect digital files (those files that you are going to sell) is to place them outside the root of your web site.

The root of the web site is normally the public_html folder or the www folder.

When placed ‘below’ these folders, it is not possible for anyone to get to those files using a web url address.

However, some hosts do not allow this, so instead you can protect your files by placing an .htaccess file in the folder.

An example .htaccess file which would do this is:

IndexIgnore *
AuthGroupFile /dev/null
AuthName Downloads
AuthType Basic

 deny from all

This will only work on a Linux type server and not on a Windows server. has quite a good set of examples and gives some good background information on htaccess / htpasswd files

Leave a Reply