I am considering the following code to block image hotlinking, while
allowing Google images and Page Speed CDN Service access:
location ~ \.(jpg|jpeg|gif|png|ico|flv|mp3|mpg|mpeg)$ {
expires max;
valid_referers blocked ~\.google\. ~\.googleusercontent\.;
if ($invalid_referer) {
rewrite ^ http://www.hollywoodgrind.com/;
}
}
Before I start using this code I’d like to know if it will allow long
addresses like the following two examples to properly gather images for
use on Google Page Speed (first example), and Google Images (second
exampled):
Posted at Nginx Forum: