NGINX写法
主服务器为主,没有就提取从服务器
if (!-d $request_filename){ set $rule_0 1$rule_0; } if (!-f $request_filename){ set $rule_0 2$rule_0; } if ($rule_0 = "21"){ rewrite ^/(.*)public\/uploads\/(.*)$ https://域名/public/uploads/$2 redirect; }
从服务器为主,没有就提取主服务器
rewrite ^/(.*)public\/uploads\/(.*)$ https://域名/public/uploads/$2 redirect;
1