1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot switch to https other than patching a file

Discussion in 'Technical Support' started by Mihai Bocsaru, Dec 21, 2017.

  1. Mihai Bocsaru New Member

    Dear Support,

    I've migrated a customer project to HTTPS using Cloud Flare's HTTPS feature, which is basically a shared certificate option from them.

    The problem that I faced was that when I've tried to change the setting:
    * Classifieds Site url

    From under:
    Settings (Main Settings)

    from:
    Code:
    http://www.panbo.com/classifieds/
    into:
    Code:
    https://www.panbo.com/classifieds/
    Inside my installation generated pages I've ended up having:
    Code:
    http://https://www.panbo.com/classifieds/
    There is also an optional field called "Secure url or https", but it looked like it doesn't work.

    The only solution that I found was to patch this file:
    Code:
    /includes/classes/kernel/Core.php
    And change the lines 114 and 115 from:
    Code:
            if ((substr(strtolower($url), 0, 7) != "http://"))
     
                $url = "http://" . $url;
    into:
    Code:
            if ((substr(strtolower($url), 0, 7) != "https://"))
     
                $url = "https://" . $url;
    And then changing the value provided on the field:
    * Classifieds Site url

    from:
    Code:
    http://www.panbo.com/classifieds/
    or:
    Code:
    https://www.panbo.com/classifieds/
    into:
    Code:
    www.panbo.com/classifieds/
    You may like to check the way the 68classifieds is done and specify somewhere how could one do what I've tried without having to patch an internal file and without having to remember to patch it again in the future, when upgrading 68classifieds.

    Many thanks,
    Mihai Bocsaru
  2. Mike-N-Tosh Owner

    There should be no need whatsoever to modify anything to make this work. If you are getting the results that you are, would indicate that something else has been modified. This is the same code that has worked on thousands of websites worldwide through many versions of the 68 classifieds script.

    You should be able to simply fill in the "https://" url in the main settings in admin.

Share This Page