nginx 某个url或者url下面的图片不能访问就跳到指定的url

                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;
                        }
                }
 
http://house.xak1c.com/attachments/****/***/*** 图片类型的文件不能访问均跳到  http://house.xak1c.com/static/images/nophotosmall.gif

你可能感兴趣的:(nginx,职场,url,休闲,指定url)