Log in

View Full Version : http/ https problem



gavintat
02-19-2008, 04:34 AM
Recently, I've got a problem in building up a website.
I have to migrate my website from http one to https.
But there is a problem.

in http:
after database processing, it redirects the internal page by using func header("Location: xxx.php");.
It works properly.

However:
in https:
func header("Location: xxx.php"); doesn't work anymore, it states in its own URL only.

Should I make some changes in my server setting?
Or it is always to have this problem?

I can't find any solution from google or sth.
Please help me if anyone get idea. T.T
Thanks

codeexploiter
02-19-2008, 05:23 AM
Try the following method



<?php
$redirUrl = "Location: https://www.example.com/page.php";
header($redirUrl);
?>


Use your domain name and page name in the above mentioned URL

gavintat
02-19-2008, 06:03 AM
Try the following method



<?php
$redirUrl = "Location: https://www.example.com/page.php";
header($redirUrl);
?>


Use your domain name and page name in the above mentioned URL

Thanks your reply.
I tried it b4.
it doesn't work 2.
Is there any difference between "Location: https://www.example.com/page.php"; and "Location: page.php";?