Wendal Chen
July 17, 2011 09:08AM
Try this:

location ~ \.(swf|mp4)$ {
valid_referers server_names blocked *.mysite.com;
if ($invalid_referer) {
rewrite ^(.*)$ /hl.png break;
}
}

location =/hl.png {
root /home/tophi/www/images;
}

2011/7/16 tophi <nginx-forum@nginx.us>

> None of the above methos has helped me.
> My files are .swf and .mp4 .
> Here is an example of my conf
>
>
> valid_referers none blocked mysite.com;
> location /home/tophi/www/files/
> {
> if ($invalid_referer) {
> rewrite ^ /home/tophi/www/images/hl.png last;
> }
> }
>
>
> location ~ \.(swf|mp4)$ {
> valid_referers server_names blocked *.mysite.com;
> if ($invalid_referer) {
> rewrite ^(.*)$ /home/tophi/www/images/hl.png break;
> }
> }
>
> please advice
> thanks
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,39501,212475#msg-212475
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



--
Wendal Chen
http://t.sina.com.cn/1068040557?s=6uyXnP
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

hotlink protection with rewrite

vicky007 January 10, 2010 01:29PM

Re: hotlink protection with rewrite

proforg January 10, 2010 01:50PM

Re: hotlink protection with rewrite

Piotr Karbowski January 10, 2010 03:12PM

Re: hotlink protection with rewrite

vicky007 January 10, 2010 03:30PM

Re: hotlink protection with rewrite

samfingcul January 30, 2010 11:51AM

Re: hotlink protection with rewrite

vicky007 January 31, 2010 07:47AM

Re: hotlink protection with rewrite

tophi July 16, 2011 07:39AM

Re: hotlink protection with rewrite

Wendal Chen July 17, 2011 09:08AM

Re: hotlink protection with rewrite

tophi July 17, 2011 09:32AM

Re: hotlink protection with rewrite

antituhan July 17, 2011 11:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
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