rewrite模块:
return指令
return code [text];
return code Url;
return Url;
返回 code
444:永久关闭连接
301:永久重定向
302:临时重定向
HTTP1.1标准
303:临时重定向 允许改变get或POST方法
307:临时重定向 不允许改变方法
308:永久重定向 不允许改变方法
error_page 指令
code uil
如: error_page 404 /404.html
error_page 404 500 502 /500.html;
error_page 404=200 /xxx.png (当发生404时候 返回一张图片 返回码是200)
location / {
error_page 404 =@fallback;
}
location @fallback{
proxy_pass http://backend;
}