Using https

I have two questions regarding https. I have been looking through the forum and it seems that all I have to do to use a secure page is to use https instead of http.

My current php code uses

header('Location: /members/loginmain.html.php');

How do I write that to use https. I tried https://members/loginmain.html.php but that didn’t work. members is a directory off the root.

Also, I am using apache locally to test the system. Do I need to do anything to it to make it able to use https?

Thanks

yea, if you’re on https, using relative addressing will keep it on https. you’ll have to specify the protocol you want if you want to change protocols (http vs https)

I think I may have just answered my first question.

If I use https://domainname/members… it opens the page with https. So once the page is open with https does that mean all is now working fine?

Also, if I want to use an include like

include $_SERVER['DOCUMENT_ROOT'] . '/members/passchange.html.php';

can I do that with https?

Thanks for the update and I noticed that once it goes https it stays there unless you specifically issue an http header. So I can handle that but I don’t think I will be able to use relative addressing, I will need to fully qualify my addresses as http or https. Is that a correct assumption?

if you want all your pages to be on https, you can redirect all your non https pages like this

http://poundpipe.com/v/baaah/redirect-all-non-secure-pages-to-https

once your on https, any redirects like /members/loginmain.html.php will stay on https