close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Redirect checkout pages to https and back to http

Thread began 10/11/2011 1:31 pm by hendberg363006 | Last modified 10/12/2011 2:47 pm by hendberg363006 | 939 views | 2 replies |

hendberg363006

Redirect checkout pages to https and back to http

My site makes use of a dedicated SSL certificate.

Read through all the solutions given in this forum about redirect to https and back to http.
I am not sure what to use in my site.

1__Do I have to use both the following scripts in the cartpage :

on line 1:

<?php*if((!(isset($_SERVER['HTTPS'])))*||*($_SERVER['HTTPS']*==*"")*||*($_SERVER['HTTPS']*==*"off"))header("Location:*https://"*.*$_SERVER['HTTP_HOST']*.*$_SERVER['PHP_SELF']);*?>

and change the redirect
from
$Redirect_redirStr="checkout.php";
to
$Redirect_redirStr="https://www.mydomain.com/checkout.php";

2__ Does this redirect influence the : $WAFV_Redirect = "checkout.php"; on my confirm page ?

3__Do all links/menulinks to http pages from these checkout pages need the following code on line 1 to go back to http ?

<?php*if((!(isset($_SERVER['HTTPS'])))*||*($_SERVER['HTTPS']*==*"")*||*($_SERVER['HTTPS']*==*"off"))header("Location:*http://"*.*$_SERVER['HTTP_HOST']*.*$_SERVER['PHP_SELF']);*?>

or
do I have to use the link http://www.mydomain.com/somepage.php for all of them.

Would appreciate some help !

Sign in to reply to this post

Jason ByrnesWebAssist

on any page that should be served using the HTTPS address, add this code at line 1:

php:
<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://www.<your domain here>" $_SERVER['PHP_SELF']); ?>




on any page that should not be served through the HTTPS address, add this code at line 1:

php:
<?php

if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); ?>



the code snippet will cause any page accessed using the HTTP address to redirect to the HTTPS address, the second will reverse it.

aside from the checkout redircet:
$Redirect_redirStr="https://www.mydomain.com/checkout.php";


no other changes will be necessary.

Sign in to reply to this post

hendberg363006

Thank you Jason for a quick and very clear answer.

Appreciate your help !!!

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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