Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    133
    Plugin Contributions
    1

    Default How to make all store links go through https

    I have SSL enabled on my store (v1.5.5f).

    It goes to https during checkout, login etc.

    I would like to have all store pages go to https, not just login or checkout.

    Is it possible? In configure.php files, I have the following:

    in /admin/includes/configure.php

    define('HTTP_SERVER', 'https://www.MYDOMAIN.com');
    define('HTTP_CATALOG_SERVER', 'http://www.MYDOMAIN.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.MYDOMAIN.com');
    define('ENABLE_SSL_CATALOG', 'true');

    in /includes/configure.php

    define('HTTP_SERVER', 'http://www.MYDOMAIN.com');
    define('HTTPS_SERVER', 'https://www.MYDOMAIN.com');
    define('ENABLE_SSL', 'true');

    There was a lengthy thread here from a year ago HERE, but it got lost in a lot of philosophical discussion. Someone said, I think, to set ENABLE_SSL to false and it would SSL all pages. This is not true; it then doesn't SSL any pages.

    It seems I could modify the zen_href_link() function in html_output.php by simply forcing the connection to SSL all the time by inserting this at line 26:

    PHP Code:
    $connection 'SSL'
    Then the following tests always evaluate to SSL and every link is forced to https.

    Is this the easiest way, or is there something I'm missing with the configure files?

    Or would it be better to set both defines to the https version, i.e.:

    define('HTTP_CATALOG_SERVER', 'https://www.MYDOMAIN.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.MYDOMAIN.com');

    Thanks,
    - Stephen
    Last edited by karma-lab; 30 Jun 2018 at 01:55 AM.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: How to make all store links go through https

    Both defines to https is the best solution as (now) identified in this FAQ: https://www.zen-cart.com/content.php...alled-zen-cart
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Apr 2008
    Posts
    133
    Plugin Contributions
    1

    Default Re: How to make all store links go through https

    Thanks!

 

 

Similar Threads

  1. Replies: 17
    Last Post: 30 May 2018, 10:27 AM
  2. Replies: 36
    Last Post: 30 Dec 2017, 01:17 PM
  3. v150 Setting all links to https
    By Jason Kerl in forum General Questions
    Replies: 3
    Last Post: 8 Feb 2013, 12:31 AM
  4. SSL works but all links remain http not https
    By spriggig in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Oct 2008, 08:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR