So I am including the following code ontop of every page. I want it to redirect to http:// when it detects a https:// IF it isn't in the array.
PHP Code:
$secureArray = array('signup.php','signin.php');
if (!in_array($secureArray,$_SERVER['REQUEST_URI'])) {
if ($_SERVER['SERVER_PORT'] == 443) {
header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}
}
When I visit a page that isn't in the secureArray, it redirects fine -- but when i go to signup.php or signin.php, it can't resolve the page...
Thanks,
Mike