Forum | Really Simple SSL

Excluding links from https override

Home Forums General issues Excluding links from https override

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #822
    Mathieu Bl
    Guest

    Hello,

    I have an iframe on my homepage which src is from another wordpress that is not https.

    <iframe class="wp-embedded-content" src="http://otherdomain.com/something" width="500" height="523"></iframe>';

    Simple SSL changes the src to https://otherdomain.com/something thus the iframe doesn’t load.

    I have search the doc for a way to exclude this specific link, but it seems it’s not working (I did try to add a filter function to rlrsssl_replace_url_args).

    Do you have any clue on how I could achieve this?

    Thanks.

    #823
    Rogier
    Keymaster

    I guess this should work. Use the filter to remove the src=”http from the array. You could edit this by adding a condition as well.

    function my_custom_http_urls($arr) {
    global $post;
    if ($post->ID = 20) {
      unset($arr["src='http://"]);
      //or, if double quotes were used:
      unset($arr['src="http://']);
    }
      return $arr;
    }
    add_filter("rlrsssl_replace_url_args","my_custom_http_urls");
    #826
    Mathieu Bl
    Guest

    Hello again,

    Thanks for the answer. Sadly, it doesn’t work. I also cannot use global $post as the link I’m trying to remove from the array is from another domain.

    I wouldn’t mind if I could just get an array of all the urls that are going to be changed to https. This way I could remove specific full urls from the array.

    #827
    Rogier
    Keymaster

    The mixed content doesn’t work that way: creating an array of all links to be replaced before replacing them would be too slow and complex.

    So it works by replacing all src=”http://, and uses regex patterns as well.

    In your case, your options seem to be: either disable the mixed content fixer, remove the video, or moving the video to an ssl environment.

    You can of course also look for a different plugin, I think there are plugins which offer more configuration options, at a performance price of course.

    #21891
    daniel
    Guest

    hi guys, im using this plugin and solve me life!

    but i have an iframe in some post that the plugin rewrite the url to https.

    i put this code in the function php but dont work.

    function rsssl_exclude_http_url($html) {
    $html = str_replace(“https://www.domain.com&#8221;, “http://www.domain.com&#8221;, $html);
    return $html;
    }
    add_filter(“rsssl_fixer_output”,”rsssl_exclude_http_url”);

    the url of the iframe for example is

    <iframe src=”https://data.bolavip.com/fsnbolavip/html/v3/index.html?channel=deportes.futbol.ecuador.posiciones&lang=es_LA&#8221; width=”100%” height=”500px” frameborder=”0″></iframe>

    #21895
    daniel
    Guest

    sorry i put wrong the url. the original url is http://data.bolavip.com/fsnbolavip/html/v3/index.htm…&#8230;. and the plugin rewrite to https….. thanks

    #22131
    Rogier
    Keymaster

    Sorry for the late response, missed your post!

    You need to change domain.com to the url you don’t want https:

    function rsssl_exclude_http_url($html) {
      $html = str_replace(
        'https://data.bolavip.com/', 
        'http://data.bolavip.com/', $html); 
      return $html;
    }
    add_filter('rsssl_fixer_output','rsssl_exclude_http_url');
    #39384
    Rob Buller
    Guest

    which functions file is this supposed to go in? I tried the one in my theme and it broke my site.

    #39655
    Rogier
    Keymaster

    The location was probably right, I think the issue was that the texteditor does something strange with the double quote in my function, which might prevent it from being recognized as such, which breaks the script. I’ve now changed the quotes into single quotes, which seem not to be changed by the texteditor.

    #226443
    dadiaoge
    Guest

    thinks,it is work!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Excluding links from https override’ is closed to new replies.

Subscribe