It is possible to perform an HTTPS redirect using PHP code as well as writing PHP code to prevent the browser from caching your we code example
Example 1: php redirect
header("Location: http://example.com");
die();
Example 2: header location in php
<?php
// This will redirect to google.com
$url = "https://google.com";
header("Location: $url");
?>