Forum Moderators: coopster

Message Too Old, No Replies

Good way to switch between HTTP and HTTPS

Having problems with my SSL certificate

         

Ben_Johnson

6:23 pm on Feb 8, 2006 (gmt 0)

10+ Year Member



I just bought an SSL certificate for my client and installed it. It's working, but only certain parts of the website need to be secure. You can buy products on this website and I store the items in their cart in a session.

The problem is that if they add items to their cart under HTTP and then I switch them over to HTTPS when checking out it says there is nothing in their cart. I couldn't figure this out, so I just added this to the top of my global file:

if(!isset($_SERVER['HTTPS']) ¦¦ substr($_SERVER['HTTP_HOST'],0,4) == 'www.') {
header("Location: [".((substr($_SERVER['HTTP_HOST'],0,4)...] == 'www.')? substr($_SERVER['HTTP_HOST'],4) : $_SERVER['HTTP_HOST']).$_SERVER['REQUEST_URI']);
exit;
}

Now the whole site is secure, but for some reason when I go to IE it says some of the items on the page are not secure, which is annoying. Firefox does not tell me this, because everything on the page is secure, everything uses relative paths.

So do you have any suggestions on how to switch between HTTP and HTTPS flawlessly or find out why IE is saying some items on my page aren;t secure and which items it is referring to?

Thanks for your help.

Ben_Johnson

6:52 pm on Feb 8, 2006 (gmt 0)

10+ Year Member



I found out why IE was telling me some items were not secure. This is strange:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="770" height="265"><param name="movie" value="{#image_path#}header.swf"><param name="quality" value="high"><embed src="{#image_path#}header.swf" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="265"></embed></object>

If you dont make the codebase and pluginspage secure then it will give you that message, which is very dumb in my opinion.