i always use a variable called $HTTP_FRONT to avoid having to use relative links:
if($HTTPS == "on")
$HTTP_FRONT = "https://";
else
$HTTP_FRONT = "http://";
header("Location: $HTTP_FRONT$HTTP_HOST/page.php");
you can, obviously, modify it so that yr only using ssl in specific places