...

View Full Version : .htaccess question



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.

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

<http://apache-server.com/tutorials/ATusing-htaccess.html>
<http://httpd.apache.org/docs/howto/htaccess.html>
<http://wsabstract.com/howto/htaccess.shtml>
<http://www.freewebmasterhelp.com/tutorials/htaccess/>
<http://www.webdeveloper.com/servers/servers_htaccess_magic.html>

Ido Perelmutter
11-06-2003, 03:58 PM
thanks

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

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


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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum