How do I redirect HTTPS to HTTP on NGINX?

前端 未结 6 1229
孤城傲影
孤城傲影 2020-12-23 13:33

Is there a way to redirect HTTPS requests to HTTP by adding a rule in the domain\'s vhost file?

6条回答
  •  情歌与酒
    2020-12-23 14:00

    location / {
        if ($scheme = https) {
            rewrite ^(.*)? http://$http_host$1 permanent;
        }
    }
    

提交回复
热议问题