<?php
if(!isset($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != "on")
{
error_reporting(E_ALL | E_WARNING | E_NOTICE);
ini_set('display_errors', TRUE);
header("Location: https://somesite.com/it");
die('should have redirected by now');
}
?>
This is the actual code I am using there are no spaces or anything before the first line of code.
Returns: Warning: Cannot modify header information - headers already sent by (output started at /home/somesite/public_html/it/test.php:1) in /home/somesite/public_html/iq/test.php on line 8 should have redirected by now
Why does it say that I have sent headers on the first line? How do I fix this?