Excluding links from https override

Home Forums General issues Excluding links from https override

This topic contains 6 replies, has 2 voices, and was last updated by  Rogier Lankhorst 4 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #822 Reply

    Mathieu Bl

    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 Reply

    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 Reply

    Mathieu Bl

    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 Reply

    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 Reply

    daniel

    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”, “http://www.domain.com”, $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” width=”100%” height=”500px” frameborder=”0″></iframe>

    #21895 Reply

    daniel

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

    #22131 Reply

    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”);

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Excluding links from https override
Your information: