<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?>
This will take them to the same page but with https. Do you know if your secure certificate works with your domain by itself as well as with the domain and www. in front of it? If the certificate only works for www. then you may want to hard code that in the script along with your domain like this:
<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://www.<your domain here>" . $_SERVER['PHP_SELF']); ?>
Hi Eric, I tried both methods (with and without the hardcoded url) and it the page still goes to http. I'm wondering if my problem now is the way that our ssl was initially installed. When we first had the ssl cert installed, comodo set it up so the entire site was behind the https. This dropped us like a rock in SEO rankings, so I asked them to remove the redirect for the site, and I planned on just setting it up so that the checkout and confirm pages went through https (using your line of code). I placed the code on line one of the checkout page, uploaded it, and the page continues to come up under http.
Is it the way Comodo removed the redirect? When they did it, the tech said "I have commented out a rewrite rule in the htaccess for that site. To reactivate the https remove the # on the front of the lines 6 7 and 8"
Is it possible the htaccess is over riding the line of code on the checkout page?
I have now tried to use the suggested code on the checkout page, and it just goes to the http and the page won't go to https. Then I read through the forums and saw Jason's suggestion for changing the button behavior so that it redirects it to the uttps url, and got the same results--it still just goes to http. I'm totally stumped. Any suggestions would be appreciated. I may need to start a support ticket so that I can submit the .htaccess page and the php pages.