Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    Israel (Rules!!)
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess question

    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.
    Live Fat, Die Young

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    Israel (Rules!!)
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks
    Live Fat, Die Young

  • #4
    New to the CF scene
    Join Date
    Nov 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is an interesting line of thought. But what sort of htaccess script would you need to turn a site off?

  • #5
    Regular Coder dswimboy's Avatar
    Join Date
    Nov 2003
    Location
    mostly in Ann Arbor
    Posts
    458
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <Files .*>
    order allow,deny
    deny from all
    </Files>
    i'm not positive it would work, but i think it would.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •