zoukankan      html  css  js  c++  java
  • nginx post/get请求全部访问制定页面

    不要修改Content-Type

    error_page 405 =200 @405;
    location @405 {
    root /usr/share/nginx/html;
    proxy_method GET;
    proxy_pass http://127.0.0.1/$request_uri;
    }
    location / {
    rewrite ^(.*)$ /index.html break;
    }

    需要修改Content-Type

    error_page 405 =200 @405;
    location @405 {
    root /usr/share/nginx/html;
    proxy_method GET;
    proxy_pass http://127.0.0.1/$request_uri;
    }
    location / {

    default_type application/json;
    return 200 '{"result": "","code": 302, "message": "Request failed. Please try again later (Error code:500).","msgDetails": "服务升级中,请稍后再试"}';

    }

  • 相关阅读:
    DQL-联合查询
    DQL-分页查询
    DQL-子查询
    DQL-分组查询
    DQL-常见的函数
    DQL-排序查询
    DQL-条件查询
    前端底层-js介绍
    HTML8
    HTML7
  • 原文地址:https://www.cnblogs.com/st12345/p/15015653.html
Copyright © 2011-2022 走看看