Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

Thanks

share|improve this question
    
I found a nice solution for nginx here: tech.nocr.at/hacking-security/hotlink-prevention-in-nginx –  alfish Sep 6 '11 at 16:43

1 Answer 1

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

share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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