nginx配置防盗链
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ { valid_referers none blocked *.XX.org www.XX.org; if ($invalid_referer) { #rewrite ^/ http://www.example.com/403.html; return 403; } }
nginx配置防盗链
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ { valid_referers none blocked *.XX.org www.XX.org; if ($invalid_referer) { #rewrite ^/ http://www.example.com/403.html; return 403; } }