How to exclude a URL from the mixed content fixer

Sometimes it is necessary to exclude a certain URL from the mixed content fixer. For those who don’t know already: the mixed content fixer in Really Simple SSL changes all URLs from http to https, except for hyperlinks to other domains.

This can be easily accomplished with a filter, which you can add 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 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");
Simple and Performant Security.
Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vulnerability Detection and SSL certificate generation.