We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29774
    • 386 Posts
    Insert below line 17 of ssl.php. If your 404 page has an doc id of 3 :

    17: $id = $modx->documentIdentifier;
    18: if ($id == "3"){
    19: exit;
    20: }
    


    In theory this should exit the plugin script before it runs on the 404 page.
      Snippets: GoogleMap | FileDetails | Related Plugin: SSL
      • 27330
      • 884 Posts
      doesn’t work the bail out call smiley
      I think I’ll look at htaccess alternative since it’s only a single page I want to force ssl.
        • 27330
        • 884 Posts
        my htaccess rules mixed up with FURL and I endeed up using a snippet on my payment page.
        just call it before the payment form and SSL will be used on the page.
        //force redirect to secure page
        if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); }
          • 5467
          • 2 Posts
          Sinbad,

          I am having the same issue you were having. I didn’t understand your solution. What did you do to fix it?

          My Error when ssl enabled:

          « MODx Parse Error »
          MODx encountered the following error while attempting to parse the requested resource:
          « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’ at line 1 »
          SQL: SELECT tv.*, IF(tvc.value!=’’,tvc.value,tv.default_text) as value FROM `modxsite`.`modx_site_tmplvars` tv INNER JOIN `modxsite`.`modx_site_tmplvar_templates` tvtpl ON tvtpl.tmplvarid = tv.id LEFT JOIN `modxsite`.`modx_site_tmplvar_contentvalues` tvc ON tvc.tmplvarid=tv.id AND tvc.contentid = ’’ WHERE tv.name IN (’encryption’) AND tvtpl.templateid =
            • 27330
            • 884 Posts

            I didn’t fix it. I couldn’t get the plugin to work for me so I turned to another direction.
            Since I only have one page for ssl I think it’s even better in my case to use this snippet instead of the plugin.

            If you want to try it create a new snippet called ’sslEnabled’ and use this for the snippet code
            <?php
            //force redirect to secure page
            if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); }
            ?>
            


            then call the snippet [!sslEnabled!] on the page, before the payment form.
            that will force ssl for that page only.
              • 5467
              • 2 Posts
              Thanks Sinbad! I only have 1 or 2 pages that I want SSL on like you, so that worked great.
                • 5340
                • 1,624 Posts
                Under the following conditions this plugin should be modified like here

                1. Secure manager (https)
                2. Some secure pages
                3. QM+

                When using QM+ on unsecured pages you get a referrer error because you are requesting secure pages. To remove that error use the solution in the linked post.


                  • 36695
                  • 47 Posts
                  Ah! Tearing hair out here!
                  Using this plugin(s) I am successfully redirected if I enter http://www.site.com/securepage.html to https://www.site.com/securepage.html.
                  The little box in FF shows up next to the URL, but I get the big scary "The requested URL /securepage.html was not found on this server." message.
                  If I go direct to the page using index.php?q=ID (with either http or https) then it shows the page.
                  Presumably this is an htaccess issue, but I’ve tried all the various amends in the forums and none have worked. Has anyone actually got this working with fURLs?
                    • 5340
                    • 1,624 Posts
                    I have this working on a few website without problems. Are you using the default htaccess?
                      • 36695
                      • 47 Posts
                      Thanks for your reply. Yes it’s just the default one. (from MODx 1.0.2). Did you make any adjustments to htaccess at all?