I\'m working on a site that allows users to purchase digital content and have implemented a method that attempts to serve secure downloads.
I\'m using CodeIgniter to
.htaccess should look like this if you want them to only be downloadable from your localhost. Also, it removes some handlers that that could try to access any of the files, just in case. So that way only you have access to it. Also a good idea to store an index.php file in there that checks the existance of another file, and if exists, set the header, if not, exit.
.htaccess file:
Order Deny,Allow
Deny from all
Allow from localhost
RemoveHandler .php .php3 .phtml .cgi .fcgi .pl .fpl .shtml