expires有效,防盜鏈?zhǔn)? location ~* ^.+\.(jpg|jpeg|gif|png|swf|rar|zip)$ {
location ~* ^.+\.(jpg|jpeg|gif|png|css|js|swf)$ {
access_log off;
root /opt/htdocs/career;
expires 1h;
#break;
}
valid_referers none blocked *.c1gstudio.com;
if ($invalid_referer) {
rewrite ^/ http://leech.c1gstudio.com/leech.gif;
return 412;
}
}
只有js和css的expire有效,防盜鏈有效
location ~* ^.+\.(jpg|jpeg|gif|png|swf|rar|zip)$ {
valid_referers none blocked *.c1gstudio.com;
if ($invalid_referer) {
rewrite ^/ http://leech.c1gstudio.com/leech.gif;
return 412;
}
}
location ~* ^.+\.(jpg|jpeg|gif|png|css|js|swf)$ {
access_log off;
root /opt/htdocs/career;
expires 1h;
#break;
}
讓expire和防盜鏈都有效 }
location ~* ^.+\.(jpg|jpeg|gif|png|swf|rar|zip|css|js)$ {
valid_referers none blocked *.c1gstudio.com;
if ($invalid_referer) {
rewrite ^/ http://leech.c1gstudio.com/leech.gif;
return 412;
}
access_log off;
root /opt/htdocs/career;
expires 1h;
break;
聯(lián)系客服