try this :
location ~ \.(swf|mp4)$ {
valid_referers server_names *.mysite.com;
if ($invalid_referer) {
rewrite ^(.*)$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
or you can try this one
location ~ \.(swf|mp4)$ {
valid_referers server_names none *.mysite.com;
if ($invalid_referer) {
rewrite ^(.*)$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
hope it useful :)
--
View this message in context: http://nginx.2469901.n2.nabble.com/hotlink-protection-with-rewrite-tp4282097p6593289.html
Sent from the nginx mailing list archive at Nabble.com._______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx