<?php

// Redirect from HTTP to HTTPS
if (empty(['HTTPS']) || ['HTTPS'] == "off")
{
   = 'https://' . ['HTTP_HOST'] . ['REQUEST_URI'];

  header('HTTP/1.1 301 Moved Permanently');
  header('Location: ' . );

  exit();
}
else
{
   = 'Nothing to see here!';
   = ['HTTP_HOST'];

?>
<!DOCTYPE html>
<html>
<title><?php print ; ?> | <?php print ; ?></title>
<style type="text/css" >
footer {
  position: absolute;
  bottom: 15px;
  text-align: center;
  width: 99%;
}
body { text-align: center; }
h1 { font-size: 3em; }
p { font-size: 2em; }
</style>
<body>
<h1><?php print ; ?></h1>
<p>you may come back later, no content is guaranteed to be present thou. :-|</p>
</body>
<footer><a href="https://<?php print ; ?>"><?php print ; ?></a></footer>
</html>
<?php

}

?>
