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