Hi, all, I'm newbie to PHP. I'm trying to modify a program so that all page except login are http. I try the header function as following: --------------- cut here ------------- if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on")) { $url = $_SERVER['SERVER_NAME']; $query = $_SERVER['QUERY_STRING']; $path = $_SERVER['PHP_SELF']; header("Location: http://$url$path?$query"); } --------------- cut here ------------- However, this always reload the "current" login page which is called from some other pages (html or PHP), e.g. <a href="authenticate.php?action=login"> Would anyone please help? Sorry for the newbie question and poor English. Thanks a lot.