bluesapphire Posted April 21, 2006 Share Posted April 21, 2006 Hi! 1 - How to verify tgrough PHP script that SSL certificate is successfully installed on server. 2 - If some one types "http://mypage.com/1.php" , then I want to redirect and change the url to secure server i.e; "https://mypage.com/1.php". How is it possible?Kind Regards Quote Link to comment https://forums.phpfreaks.com/topic/8047-how-to-transfer-webpages-from-http-to-https/ Share on other sites More sharing options...
redbullmarky Posted April 21, 2006 Share Posted April 21, 2006 [!--quoteo(post=367208:date=Apr 21 2006, 04:01 PM:name=David Blix)--][div class=\'quotetop\']QUOTE(David Blix @ Apr 21 2006, 04:01 PM) [snapback]367208[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hi! 1 - How to verify tgrough PHP script that SSL certificate is successfully installed on server. 2 - If some one types "http://mypage.com/1.php" , then I want to redirect and change the url to secure server i.e; "https://mypage.com/1.php". How is it possible?Kind Regards[/quote]it really depends how your server/host is structured. for example, on my server - there are two directories. one for http files, and the other for https files. so in my http files folder (httpdocs), i just have something like:[b]1.php[/b][code]header("Location: https://mypage.com/1.php");exit;[/code]however, using another way - my server ALSO sets an extra $_SERVER variable when under SSL:[code]if (!$_SERVER["HTTPS"]){ header("Location: https://mypage.com/1.php"); exit;}[/code]$_SERVER['HTTPS'] is set to 'on' when under SSLhope that helps a bit.cheersMark Quote Link to comment https://forums.phpfreaks.com/topic/8047-how-to-transfer-webpages-from-http-to-https/#findComment-29355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.