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

    So I have an SSL certificate installed, but my base_url uses [[++site_url]] and still says 'http://www.domain.com'.
    I have changed the server_protocol setting to https
    I have emptied the cache
    I have manually emptied the core/cache folder.

    I've installed certs before and not had this problem!

    I can't think what else I can do?

    For now I have manually changed the base_url to 'https://www.domain.com' and it works fine, but I would much prefer to use '[[++site_url]]'
      • 4172
      • 5,888 Posts
      try to call it uncached
      [[!++site_url]]
      

      if the site was called by http the first time, this would be cached.
      You should also force https, for example by htaccess
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 44922
        • 131 Posts
        Andy,

        Try this in the .htaccess

        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
        
          • 51020
          • 670 Posts
          Quote from: lancipoos at Dec 13, 2017, 06:04 AM
          Andy,

          Try this in the .htaccess

          RewriteCond %{HTTPS} off
          RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
          

          Thanks - I already have this:
          <IfModule mod_rewrite.c>
          RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
          RewriteCond %{HTTP_HOST} !=localhost [NC]
          RewriteCond %{HTTP_HOST} !=127.0.0.1
          RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
          </IfModule>


          Should I combine your with this, or replace it?

            • 38705
            • 101 Posts
            You've probably set the link_tag_scheme to https?

            Go to "System settings" > "Core" > "Site" > "link_tag_scheme" and edit into "https"

            This system setting takes care of the protocol used for url-generation
              Addict since 2012....
              • 51020
              • 670 Posts
              Quote from: mintnl at Dec 16, 2017, 09:33 AM
              You've probably set the link_tag_scheme to https?

              Go to "System settings" > "Core" > "Site" > "link_tag_scheme" and edit into "https"

              This system setting takes care of the protocol used for url-generation

              Thanks.
              Just checked and link_tag_scheme is set to -1
              What does that mean?
                • 3749
                • 24,544 Posts
                -1 is the default setting. Change it to https
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 51020
                  • 670 Posts
                  Quote from: BobRay at Dec 16, 2017, 03:10 PM
                  -1 is the default setting. Change it to https

                  Thanks - that's still not working. The base_url still says 'http://www.domain.com'.
                  I have a few other sites on https, and none of them required that setting to be changed! I normally just change server_protocol to https.
                  I ave cleared the cache and also deleted the core > cache folder just in case. I can't think of anything else. Never had this issue on other sites. V odd!
                    • 3749
                    • 24,544 Posts
                    Try Andy's code above yours in .htaccess.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 51020
                      • 670 Posts
                      Quote from: BobRay at Dec 18, 2017, 05:43 PM
                      Try Andy's code above yours in .htaccess.

                      Have just tried that - still loads the base_url as http://www.domain.com

                      Never had this issue before. I don't understand why.