Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can I protect my downloads?


fszone

Recommended Posts

I want to use my store for distributing downloads to people, but I have a question.

 

Anyone who knows about the script or even just by guess & check or web crawlers can look in the "pub" directory and find the file without paying for it. Is there any way that I can protect these files from being downloaded without paying?

Link to comment
Share on other sites

Protect the "download" directory with .htaccess file like the following

 

AuthType Basic

AuthName "No access"

AuthUserFile .htnopasswd

AuthGroupFile /dev/null

Require valid-user

 

This will prevent users from browsing the place where you have placed the original download files.

 

Then do not allow directory indexing in the pub folder with a .htaccess files with the following in it.

 

Options +FollowSymLinks -Indexes

 

Then users will have to try and guess the random directory number that gets created for each order that will have a download. After the download has expired or is used up that directory and its contents is removed.

 

HTH

Tom

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...