if($_SERVER[\'HTTPS\'] == \'on\'){
$url = "http://".$_SERVER[\'HTTP_HOST\'].$_SERVER[\'REQUEST_URI\'];
header(\'Location: \'.$url, true, 301);
exit();
}
// You can turn it back on again on your secure pages using the opposite.
if($_SERVER[\'HTTPS\'] != \'on\'){
$url = "https://".$_SERVER[\'HTTP_HOST\'].$_SERVER[\'REQUEST_URI\'];
header(\'Location: \'.$url, true, 301);
exit();
}