close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Making Store Links HttpS ?

Thread began 6/04/2010 9:54 am by Peterson Design Studio - jefferis | Last modified 9/08/2010 4:51 pm by Peterson Design Studio - jefferis | 1084 views | 5 replies


Originally Said By: Eric Mittman
  The best way to do this is via a script at the top of the pages you want to ensure are only served up from the https. Here is some code that you can add to the top of these checkout pages that will do this for you:

<?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.


Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...