Quantcast
Channel: User BlaM - Server Fault
Viewing all articles
Browse latest Browse all 33

Apache 2: Prevent image hotlinking serverwide

$
0
0

I'm trying to block access to images on my server if they are linked from some common "baddies", i.e. sites with users that tend to use other peoples bandwidth:

  • livejounal.com
  • blogger.com
  • myspace.com
  • ...

There are two things that differentiate my question from others like this question and that question:

  • I want to do it "serverwide", i.e. configured in apache.conf for all hosts/domains, not in .htaccess or individual virtual hosts
  • I want to redirect the request to an image of my choice, not just send a 403 FORBIDDEN

I tried to include RewriteRules in apache.conf, but it does not do anything at all. And there doesn't seem to be an option that allows me to redirect depending on SetEnv.

Any suggestions?


Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>