将https重定向到http以获取特定的URL

时间:2020-06-01 12:01:29

标签: php html http https

我想将HTTPS重定向到HTTP以获取特殊的网址,例如:

http://www.example.com/abc.php

此脚本可以很好地将所有页面重定向到HTTPS,但我不知道如何将HTTP重定向为特定的URL

if ($_SERVER['HTTPS'] == "on" && $settings['ssl_host'] == "yes") {
    $porthttps = "https://" . $_SERVER['SERVER_NAME'];
    header("Location: " . $porthttps);
    exit();
}

谢谢。

0 个答案:

没有答案