<?php
$location = str_replace("http://", "https://", $_SERVER["HTTP_REFERER"]);
header("Location: $location");
?>
