View Full Version : .htaccess question

Ido Perelmutter
11-05-2003, 06: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.


11-05-2003, 06:52 PM
Can't help you more directly, but maybe you should look at the documentation or some articles:


Ido Perelmutter
11-06-2003, 04:58 PM

11-22-2003, 09:30 PM
This is an interesting line of thought. But what sort of htaccess script would you need to turn a site off?

11-26-2003, 07:05 PM
<Files .*>
order allow,deny
deny from all

i'm not positive it would work, but i think it would.