valid_referers problem
Adrian Janeczek
loleslav.pl at gmail.com
Sun Oct 24 03:54:22 MSD 2010
try
valid_referers blocked none allowed.dominian.tld;
2010/10/23 Todd HG <lists at ruby-forum.com>
> I am using valid_referers to detect image hotlinking. Invalid referers
> are forwarded to the homepage, however, I have since changed the address
> for images from images.hollywoodgrind.com:9000 to
> www.hollywoodgrind.com.
>
> The last line contains the rewrite rule 'rewrite ^
> http://www.hollywoodgrind.com$request_uri? permanent;', which would
> forward traffic going to images.hollywoodgrind.com:9000 to it's new
> exact location at www.hollywoodgrind.com.
>
> What I'd like is for invalid traffic to be forwarded to the home page
> located at www.hollywoodgrind.com, but for valid traffic to be forwarded
> to the new url location for the image.
>
> server {
> listen 9000;
> server_name images.hollywoodgrind.com;
> location /images {
> valid_referers blocked ~\.google\. ~\.yahoo\. ~\.bing\. ~\.ask\.
> ~\.live\. ~\.googleusercontent.com\. www.hollywoodgrind.com
> feeds.hollywoodgrind.com/HollywoodGrind
> feeds2.feedburner.com/HollywoodGrind images.google.com 209.85.171.104
> google.com www.google.com yahoo.com my.yahoo.com
> feedproxy.google.com/HollywoodGrind images.search.yahoo.com live.com
> search.live.com 209.85.173.132 ask.com images.ask.com
> translate.googleusercontent.com googleusercontent.com bing.com;
> if ($invalid_referer) {
> rewrite ^(.*)$ http://www.hollywoodgrind.com/;
> }
> rewrite ^ http://www.hollywoodgrind.com$request_uri? permanent;
> }
> }
>
> --
> Posted via http://www.ruby-forum.com/.
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
--
Pozdrawiam Admin sieci WidNet(http://widnet.eu/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101024/f93e7427/attachment.html>
More information about the nginx
mailing list