PHP https 更改 http

1 if ($_SERVER['REQUEST_SCHEME'] == 'https') {
2     $newUrl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
3     Header("HTTP/1.1 301 Moved Permanently");
4     header("Location: $newUrl");
5     exit;
6 }

 

posted @ 2020-06-22 13:43  Aqufish  阅读(437)  评论(0)    收藏  举报