Welcome! Log In Create A New Profile

Advanced

valid_referers problem

Todd HG
October 23, 2010 04:10PM
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@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

valid_referers problem

Todd HG October 23, 2010 04:10PM

Re: valid_referers problem

Adrian Janeczek October 23, 2010 07:58PM

Re: valid_referers problem

Igor Sysoev October 24, 2010 03:54AM

Re: valid_referers problem

Todd HG October 24, 2010 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready