In my server logs I noticed random sets of IP's originating from china that are downloading the same file of about 16MB every couple of hours, and every time the computer downloads it, it starts the download twice, one second apart from each other.

Currently I'm not authorized to rename the file as of yet until I manage to get a hold of the people authorized to use the file to rename it, so renaming the file will not be a solution for me at this time.

Also, I don't want to just block IP's for a period of time because the IP's could be computers of legitimate users that are temporarily hijacked.

Is there something simple I can do to stop this from happening, or do I have to rewrite half the apache server myself with more of my own programming?

  • You want to only allow the first download, but not the second? Apr 27, 2015 at 20:26
  • If the IP addresses are from China, why do you think they could be legitimate users? Is part of your site in Chinese? Apr 27, 2015 at 20:27
  • Mike- this sounds like typical bot behavior- especially lately. I have two specific bots that hit me and requests the same small number of pages/resources over and over again all day and night with several requests per page per second. I would just block them, except that I track this 5h17! One idea I like is redirecting them back to themselves!! If just a enough of us did this, that would solve the problem toot-sweet!!
    – closetnoc
    Apr 27, 2015 at 21:29
  • I just want to allow one download at one time, not two starting at once. And the reason why I don't want to just block countries out is because I have ads and its quite possible a legit user from china browses a site and likes what he/she sees and tells his/her friends and therefore I could make more money Apr 27, 2015 at 22:45

1 Answer 1


Unfortunately there is no way to prevent a file from being download twice in parallel. The HTTP protocol is stateless and as such each and every request is considered its own request for the file and the web server does not track file requests referenced against other requests for the same file.

If this becomes a substantial issue then the only way to combat it is to deny access to your server either through a firewall or through htaccess rules from the offending IP address(es).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.