nginx的防盗链规则
location ~* \.(gif|jpg|png|jpeg|bmp|swf|mp3|wmv|mp4|rmvb|mov|flv|rar|zip|7z)$ { expires 30d; valid_referers *.520pub.com *.520pub.net 520pub.com 520pub.net; if ($invalid_referer) { rewrite ^/ https://520pub.com; #return 404; } }
仅做记录!
nginx的防盗链规则
location ~* \.(gif|jpg|png|jpeg|bmp|swf|mp3|wmv|mp4|rmvb|mov|flv|rar|zip|7z)$ { expires 30d; valid_referers *.520pub.com *.520pub.net 520pub.com 520pub.net; if ($invalid_referer) { rewrite ^/ https://520pub.com; #return 404; } }
仅做记录!