server_name house.xaklc.com;
index index.php index.html index.htm;
root /data1/web1site/web/house;
location ~ ^/attachments/.*\.(php|php5)$
{
deny all;
}
location ~ ^/data/.*\.(php|php5)$
{
deny all;
}
location ~* ^/attachments/.*\.(jpg|gif|bmp|jpeg|png)$ {
if (!-e $request_filename) {
rewrite ^/(.*) /static/images/nophotosmall.gif last;
}
}
本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/577990