close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

proxy server for ssl (https://)

Thread began 11/30/2011 4:34 am by this_is_me | Last modified 1/19/2012 6:40 pm by Jason Byrnes | 1005 views | 5 replies |

this_is_me

proxy server for ssl (https://)

Hi,
my ISP uses a proxy server for secured pages (https protocol). Is there a turorial how to set the links properly? I want this only on my checkout pages but if a customer clicks the browser back button, it stays within https:
It works in the way that it adds:
mydomain.com

any idea?
thanks

Sign in to reply to this post

Jason ByrnesWebAssist

there are 2 methods pf doing this:

1) Use php code on all of your pages to force the browser to use the HTTPS address:

php:
<?php

if( $_SERVER['SERVER_PORT'] == 80) {
header('Location:https://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.basename($_SERVER['PHP_SELF']));
die();
}
?>



on pages that should not use the https address, use this code:

php:
<?php

if( $_SERVER['SERVER_PORT'] != 80) {
header('Location:http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'.basename($_SERVER['PHP_SELF']));
die();
}
?>



2) Use an httaccess rule and mod_rewrite:
force-ssl-htaccess.html

Sign in to reply to this post

glozinski107205

<?php

if (empty($_SERVER['HTTPS'])) {
$testRedirect = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $testRedirect);
curl_setopt($c, CURLOPT_TIMEOUT, 90);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 1);
$result = curl_exec($c);
if ($result) {
header("location: ".$testRedirect);
die();
}
it is not redirecting to https....help! Thank you

Sign in to reply to this post

Jason ByrnesWebAssist

if that code does not redirect to https, then https is not enabled for your server, there is no ssl certificate enabled.

Sign in to reply to this post

glozinski107205

Okay, my hosting company states this
Regardless of whether the ssl is installed properly the redirecting of the site to the https url is done through the software you're using and is usually configured somewhere in the administration area (often there will be some place to specify the secure url for the site where you can set it to www.silkpl....etc or check a box that enables the secure checkout). Since I'm not familiar with the software you're using I don't know where that would be specifically but it should be in the admin area somewhere.

Sign in to reply to this post

Jason ByrnesWebAssist

power store does not have a setting to turn ssl on or off.


the code block you reference in your first post is used to determine whether the https address can be accessed or not.

if you access the checkout page using the address;
checkout.php

that code block tests the address:
checkout.php

if it can successfully access the https address, it will redirect to the https address. If it is not redirecting, then the test for the https address failed because SSL is turned of at that address.

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