We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21417
    • 486 Posts
    Hello,

    I am absolutely baffled and wondering if someone knows how to overcome this issue I am having.

    I am wanting to change the server type to https for an existing http Evo 1.2.1 site but no matter what I do the base url (href="http://www.the-domain.com.au/") always shows as http in the front end source code - never https.

    I have changed the setting to https in Tools > Configuration > Server type.

    I have cleared the cache in Evo, and also manually via ftp by deleting the file at assets > cache > siteCache.idx.php. On checking the cache file it shows the https like so: $c['server_protocol']="https" - so that bit seems to have worked.

    I have disabled cloudflare by putting the site into development mode.

    I have uncommented the non www to www redirects in the htaccess file so basically all remains is the friendly url code.

    I even ran the 1.2.1 install in case that had any bearing with caching http but that didn't help.

    When I visit the manager login page at https I get the padlock and all looks good. But when I login from that page it redirects to the http non padlock. And when I preview the site from the Evo Manager, the site shows on http.

    If I visit a https version of the site, the page is broken (because the base url in the source code shows as http - href="https://www.the-domain.com.au/").

    If I visit a test page where I hardcoded the base url to https://www.the-domain.com.au/, it shows with the green padlock and works fine for that one page. Hardcoding is the not the solution for the site though - it also wouldn't have any bearing on the Evo manager which I also want in https.

    Could there be something in cPanel that is caching the http or something?

    Any ideas?

    Thanks for any help.

    This question has been answered by nickf08. See the first response.

    [ed. note: nickf08 last edited this post 6 years, 4 months ago.]
      Web design Adelaide
      http://gocreate.com.au
      • 38783
      • 571 Posts
      If you post the contents of the .htaccess file someone may spot something you have missed in there.
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 21417
        • 486 Posts
        Hi Andy,

        Thanks for having a look.

        I don't think its an htaccess thing (all the reidrect code has been stripped out during error checking) but here it is:
        #prevent viewing of htaccess file
        <FILES .htaccess>
          order allow,deny 
          deny from all
        </FILES>
        
        #prevent access to any sql file
        <Files ~ "\.sql$">
          Order allow,deny
          Deny from all
        </Files>
        
        #prevent viewing of .ini files
        <Files *.ini>
          order deny,allow
          deny from all
        </Files>
        
        ServerSignature Off
        
        Options -Indexes +FollowSymlinks
        
        AddDefaultCharset utf-8
        
        RewriteEngine on
        RewriteBase /
        
        #exclude /assets and /manager directories and images from rewrite rules
        RewriteRule ^(manager|assets)/.*$ - [L]
        RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
        
        #rewrite URLs to make Search Engine Friendly
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
        


        Where does the base url come from? Evolution config or htaccess? To me it feels like a caching issue somewhere, only because the base url is http in the source code, its not picking up the https from the config setting.

        Thanks for any help. [ed. note: nickf08 last edited this post 6 years, 7 months ago.]
          Web design Adelaide
          http://gocreate.com.au
          • 13226
          • 953 Posts
          Give this a try
            • 21417
            • 486 Posts
            Hi and thanks Iusemodx,

            I gave that a try but without success. It forwarded nicely in the browser it said redirected too many times. I will give that a go properly when site_url is working properly.

            Regardless, I don't think this is an htaccess forwarding issue - with the stripped back htaccess the http and https evo pages should show - with the problem being at the http, not the https because the Tools > config setting of https.

            In the http the site_url says http.
            In the https the site url also says http - this is where the problem is

            This is the code in the template head:
            <base href="[(site_url)]">

            In the manager even without any htaccess redirect code and with https chosen in Tools > config setting, the manager redirects to http address after logging in from the https address. Why would that redirect???

            This is really strange and I haven't had this problem before, it seems localised to this server. Any other ideas? Could it be related to a cPanel setting? PHP 7.0 is being used.

            Update: I just tried a copy of the site's database in a clean install on a server where I have successfully converted Evo sites from http to https. It works fine as https, the manager and frontend stay in https as expected. So I think the database of the site is aok. Maybe there is some server setting or something that is caching the site_url as http?? [ed. note: nickf08 last edited this post 6 years, 7 months ago.]
              Web design Adelaide
              http://gocreate.com.au
              • 38783
              • 571 Posts
              I was going to suggest calling <base href="[(site_url)]"> uncached - but my reading of the thread below suggests that in Evo you can't do that. However, the thread seems to contain a discussion of your problem and may lead you to an answer?

              https://forums.modx.com/index.php?action=thread&thread=48779&i=1
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 21417
                • 486 Posts
                Thanks for the link and follow up Andy. I tried a number of those things without success. I think there must be some setting that the hosting company has put in place behind the scenes relating to HTTP_HOST. Will try (they are hopeless) and get them to help. Will advise back with a solution if I get one.
                  Web design Adelaide
                  http://gocreate.com.au
                  • 38783
                  • 571 Posts
                  You mention having disabled Cloudflare but this site http://www.doesitusecloudflare.com/ detects that your site is using Cloudflare.

                  This might be because you have turned it back on again! But if not then maybe it is running despite you telling it not to and is causing confusion with your testing? [ed. note: andytough last edited this post 6 years, 7 months ago.]
                    If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                    email: [email protected] | website: https://andytough.com
                    • 21417
                    • 486 Posts
                    Yes, correct, cloudflare is back on (on purpose). Thanks for checking though.
                    This doesn't have anything to do with Cloudflare, definitely a server (or less likely an Evo) thing. I have changed Evo sites to https successfully before whilst still on cloudflare and it had no bearings in those instances.

                    ps can you please remove that link to the site. The SEO team doesn't want any extra links floating around. I will edit my post with the links once resolved. Thanks Andy.
                      Web design Adelaide
                      http://gocreate.com.au
                      • 38783
                      • 571 Posts
                      Quote from: nickf08 at Aug 21, 2017, 11:13 AM
                      Yes, correct, cloudflare is back on (on purpose). Thanks for checking though.
                      This doesn't have anything to do with Cloudflare, definitely a server (or less likely an Evo) thing. I have changed Evo sites to https successfully before whilst still on cloudflare and it had no bearings in those instances.

                      ps can you please remove that link to the site. The SEO team doesn't want any extra links floating around. I will edit my post with the links once resolved. Thanks Andy.

                      Removed!
                        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                        email: [email protected] | website: https://andytough.com