• Resolved Julian Weiland

    (@derweili)


    I’m using this plugin on a Webserver behind a WAF Server.
    By default, requests from WordPress to its own URL go the the WAF Server.
    Unfortunately the WAF Server blocks requests coming from the webserver, so I changed the /etc/hosts file from the Webserver so requests go to localhost (the server calls itself directly without WAF).

    But because the Webserver itself does not handle SSL, but the WAF does, I get following Error:

    error:1408F10B:SSL routines:ssl3_get_record:wrong version number [Error #35]

    So my question is, can I somehow disable the SSL checking in the Broken Link checker Plugin?

    Or as an alternative, can I somehow rewrite internal links from https:// to https://?

    Is there a filter I can use to change the requested URL?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @derweili !

    I trust you’re doing well!

    I think rewriting internal links would not be a good idea as then you’d have to rewrite them back again when sending to the visitors.

    However, there seems to be an option to do this. I haven’t been able to check as I don’t have a non-ssl host anymore, but this looks promising. Please try the following code:

    <?php
    
    add_filter('broken-link-checker-curl-options', function($options) {
      $options[CURLOPT_SSL_VERIFYPEER] = false;
      $options[CURLOPT_SSL_VERIFYHOST] = false;
    }, 10, 1);

    This will deactivate SSL checks.

    To install the code, please copy it to a file with a .php extension and place the file in /wp-content/mu-plugins/ directory (create the directory if it doesn’t exist).

    Hopefully this will work. If it doesn’t, another option I’ve found will require editing the plugin’s files unfortunately, but the edit is simple to apply:

    File: modules/checkers/http.php
    Line: 158: $url = $this->clean_url( $url );

    Right below this line please add:

    $url = str_replace('https', 'http', $url);

    Hope one of those will work. In the meantime, I’ll file a feature request for this option.

    Kind regards,
    Pawel

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @derweili

    I hope you are doing well and safe!

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    Feel free to let us know if you have any additional questions or problems.

    Best Regards
    Patrick Freitas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ignore SSL Certificate or Change HTTPS to HTTP’ is closed to new replies.