We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    Hello. I've searched everywhere but I'm still having problems finding a solution for this.

    I need to make a single page (contact-us.html) show up as SSL. This is what I've tried so far:

    1. Tried installing Redirector and have the http version of the page redirect to an https version of it. For whatever reason, the system is not working at all...not with any kind of redirect, so I abandoned it. Installed Redirector 1.0.3 pl on a Revo 2.1.3 site.

    2. In htaccess, I added the following at the very top of the page:

    RewriteRule ^contact-us.html https://www.sample.org/contact-us.html [L,NC,R=301]


    All I get is the following error message in Firefox:

    "The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    This problem can sometimes be caused by disabling or refusing to accept cookies."

    A weird thing I see is that if I enter the address of the secure version of the page in a browser (the address with https in front), I see the page content but without any of the formatting (css styles or images). The regular http version of the page address looks fine.

    How can I implement this? And why am I not able to see the page correctly when I try to view the https version directly?

    Below is my htaccess for this site, if it helps:

    # Friendly URLs Part
    RewriteEngine On
    RewriteBase /
    # Force all pages to go to www.sample.org for SEO
    RewriteCond %{HTTP_HOST} !^www\.sample\.org [NC]
    RewriteRule (.*) http://www.sample.org/$1 [R=301,L]
    # Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    


    MODx Revo version 2.1.3
    PHP Version 5.2.10
    Friendly URLs are on
      • 31902
      • 342 Posts
      Okay...interesting. When I check the 'Hide From Menus' checkbox (turning it off), it works. I'm using Wayfinder 2.3.3. Can anyone explain this? Any way I can go around this? I'm trying to avoid using a weblink on the menu to the page since the page can still be viewed unsecured by just going to it directly using 'http' in the address bar. [ed. note: waizen last edited this post 12 years, 10 months ago.]
        • 31902
        • 342 Posts
        I've found that any page (including the home page) that is a part of the Wayfinder menu cannot be viewed properly as an SSL (with https in front). Only pages that are not directly on the Wayfinder menu system comes up okay as https. There has to be something simple I'm missing here!
          • 44234
          • 219 Posts
          Have you added '&scheme=`1`' parameter to your wayfinder call?

          • -1 : (default value) URL is relative to site_url
          • 0 : see http
          • 1 : see https
          • full : URL is absolute, prepended with site_url from config
          • abs : URL is absolute, prepended with base_url from config
          • http : URL is absolute, forced to http scheme
          • https : URL is absolute, forced to https scheme (added in 2.3.1-pl)

          http://rtfm.modx.com/extras/revo/wayfinder#Wayfinder-GeneralParameters
            Find me on Twitter, GitHub or Google+
            • 31902
            • 342 Posts
            Thank you, David for your response.

            I see what you're saying. Unfortunately, it only gave me partial success. The project needs to have only one page (contact-us.html) be https and the other pages as http. The '&scheme=' solutions above make the site either all https or all http.

            Right now, temporarily, I've created a weblink in the top menu that takes the visitor to the https version of the contact-us.html page. Doing so takes the http version completely out of the Wayfinder flow and results in a well-rendered https version of the page. Unfortunately, once on that https version of the contact-us.html page, if I tried to click to another page, the Wayfinder menu then presents each link as the https version of the pages. So, for instance, an html version of another page called 'employment.html' will then, after landing on the https version of contact-us.html become the https version of employment.html within the Wayfinder menu (hope that made sense). It's as if the whole site switches to https. At that point, if I click on the https version of the link, the resulting page renders as if it was pure html...no styling or images.

            Again, thanks for your response.
              • 16402 ☆ A M B ☆
              • 33 Posts
              I had a similar issue and I created something that worked well. I did not have to make any changes to the .htaccess file. I documented my solution in this thread: https://forums.modx.com/thread/90594/configuring-modx-for-http-and-https#dis-post-496684

              -- Paul
                Paul Kabotie, Software Engineer & MODX Ambassador
                Rocky Mountain Region - Denver, CO
                Linkedin: http://www.linkedin.com/pub/paul-kabotie/b/a24/208/

                Attend one of our meetups! http://www.meetup.com/modx-denver/
                Join us on Facebook: http://www.facebook.com/pages/Rocking-MODX-in-Denver/152662201549963