Forum | Really Simple SSL

Exclude sub domains from HTTPS redirect

Home Forums General issues Exclude sub domains from HTTPS redirect

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1193
    Justin Lyle
    Guest

    Hello,

    I am using your amazing plug in, and its working perfectly, I just cant seem to figure out how to exclude a url from the mixed content fixer.

    I read the support document https://really-simple-ssl.com/knowledge-base/exclude-url-mixed-content-fixer/ and I found the snippet of code to fix the issue, but im not sure where im supposed to place this code, and what part of it to change for each subdomain I want to exclude. I would greatly appreciate your help 🙂

    function exclude_http_url($html) {
    $html = str_replace(“search_url”, “replace_url”, $html);
    return $html;
    }
    add_filter(“rsssl_fixer_output”,”exclude_http_url”);

    Thank you for providing such an awesome plug in, and I look forward to using it on all future sites I will build! -Justin

    #1199
    Rogier
    Keymaster

    Hi Justin,

    You can add it to your functions.php. It will execute after the mixed content fixer has done its work, so you have to replace the urls back to http, like this.

    function exclude_http_url($html) {
    $html = str_replace(“https://sub.domain.com”, “http://sub.domain.com”, $html);
    return $html;
    }
    add_filter(“rsssl_fixer_output”,”exclude_http_url”);
    #1245
    Justin Lyle
    Guest

    Hello,

    I added the code to the functions.php file like you said, and now I can no longer even get to my site. Please help me fix this, I dont know what to do.

    In the code snippet you provided, I replaced the “https://sub.domain.com” with my URL since I wanted my main URL to not have HTTPS, and only my checkout page have it. My code looked like this:

    function exclude_http_url($html) {
    $html = str_replace(“https://thepuffpack.com/packs/”, “http://thepuffpack.com/packs/”, $html);
    return $html;
    }
    add_filter(“rsssl_fixer_output”,”exclude_http_url”);

    Now I cant enter my site at all and it says the website is unable to process the request. Please help me.

    Thank you,
    Justin

    #1254
    Justin Lyle
    Guest

    I figure it out and fixed it. However I still would like there to be a way to block https on my domain and only have it on the checkout page.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Exclude sub domains from HTTPS redirect’ is closed to new replies.

Subscribe