根据url页面id 区间代理
location ~ ^/(game|app|soft|azyx|azrj)/([0-9]+)\.html$ {
set $id $2;
set_by_lua $isProxy '
local id = tonumber(ngx.var.id)
if id >= 270000 then return "1" else return "0" end
';
if ($isProxy = 1) {
proxy_pass http://proxy.t4t5.cn;
}
}
根据静态文件页面是否存在代理
location ~ ^/appheji/([a-zA-Z0-9]+)/$ {
if (!-e $request_filename) {
proxy_pass http://proxy.t4t5.cn;
}
}
Comment here is closed