I use Kleeja script to host files and noticed that certain files are downloaded many more times than the site's visit counter indicates. So I assume that the files are being leeched. The web server is Nginx. Just wondering how to block leeching.


It is traditionally done by disallowing access or redirecting when the referrer is from another domain.

There are a number of ways to accomplish this, including using .htaccess files to redirect based on referrer. For nginx, NginxHttpRewriteModule

| improve this answer | |
  • Thanks, Do you know how can I do this using nginx? – alfish Sep 6 '11 at 15:08
  • The nginx rewrite directive is mentioned in the link above. – alfish Sep 6 '11 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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