Jump to content

How to transfer webpages from HTTP to HTTPS


bluesapphire

Recommended Posts

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
Link to comment
Share on other sites

[!--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 SSL

hope that helps a bit.
cheers
Mark
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.