1
I have a website that’s on https
, but there is a specific page that pulls information from another site that is not on https
, which prevents the page in question from correctly loading the content, as the browser is blocking the upload due to the fact that the content’s source page is not on https
, faced with this need to find a way in PHP
to force redirect of https
for http
only on the page www.domain.com.br/clipping and keep the other pages of the site as https
.
At the moment my code is like this, but it is not working, always gives incorrect redirection error.
if ($_SERVER["SERVER_PORT"] != "80") {
$url = $_SERVER['REQUEST_URI'];
if ($url == "/clipping"){
$link = "http://". $_SERVER['HTTP_HOST']. $url;
header("HTTP/1.1 301 Moved Permanently");
header("Location: $link");
exit;
}
}