nginx 配置路由转发且去掉指定字段路由


假若我访问 test.com/images/,去访问图片,而服务器储存图片的路径是 /home/static/uploads/ ,实际上服务器上没有images的文件夹,

        # 图片服务器
        location /images {  
            root   /home/static/uploads;
            rewrite "^/images/(.*)$" /$1 break;   
            index index.html;     
        }