Hotlink prevention doesn't work for me?

Evert nginx-forum at nginx.us
Thu Aug 11 16:50:29 UTC 2011


Hi all!
 
I got the following in my config:

*********************************************************************
  location / {

valid_referers none blocked site.domain.com ~(google.);
 if ($invalid_referer) {
   rewrite ^/wp-content/uploads.*\.(gif|jpg|jpeg|png)$
http://site2.domain.com/dont_hotlink.png last;
    }

[..............]
*********************************************************************

Why isn't this sending all 'foreign' .jpg file requests to
http://site2.domain.com/dont_hotlink.png ?
 
Using nginx 1.0.5
 
greetings,
  Evert

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,213708,213708#msg-213708



More information about the nginx mailing list