Ido Perelmutter
11-05-2003, 05:46 PM
Hey there!
I've got a certain bandwidth limit to my website and last month I got a 35GB excess bandwidth which cost me 260$. Most of my bandwidth goes to my rich download collection. I've decided to write a CGI program that automatically restricts downloading of the download section files after a certain bandwidth has been used. Now the problem is not writing the program (I know Perl), but it's just I don't really know how to prevent file downloads. Now I remember that with .htaccess I can prevent access to certain files (Or something like that). So let's say that my program will automatically create an .htaccess files in my chosen directories which in turn set files of certain types (Let's say .zip) to be unaccessible. Is it possible? And if so, how? I mean, how should the .htaccess file look like? If it isn't possible, I will be happy to hear other suggestions.
Thanks,
Ido.
I've got a certain bandwidth limit to my website and last month I got a 35GB excess bandwidth which cost me 260$. Most of my bandwidth goes to my rich download collection. I've decided to write a CGI program that automatically restricts downloading of the download section files after a certain bandwidth has been used. Now the problem is not writing the program (I know Perl), but it's just I don't really know how to prevent file downloads. Now I remember that with .htaccess I can prevent access to certain files (Or something like that). So let's say that my program will automatically create an .htaccess files in my chosen directories which in turn set files of certain types (Let's say .zip) to be unaccessible. Is it possible? And if so, how? I mean, how should the .htaccess file look like? If it isn't possible, I will be happy to hear other suggestions.
Thanks,
Ido.