• Hi I’am using Version 2.4.1 of your plugin with the setting “open links in new tab”. I have just migrated my site from http to https and am experiencing now to following behavior. Links that contain https in their url open fine. Links that contain http are not opened correctly. eafl seems to changes the http to https what results in an ugly SSL_ERROR_BAD_CERT_DOMAIN. Is there anything I can do about it?

    Thanks a lot for your help!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Brecht

    (@brechtvds)

    Which links are changed from HTTP to HTTPS? Can you give me an example of a before and after?

    Kind regards,
    Brecht

    Thread Starter loolo

    (@loolo)

    My site was running under http://www.my-domain.com now it runs under https://www.my-domain.com.
    The links that I manage with your plugin did not change.

    If I now click on an eafl-link on my site that points to an http-url i.e. http://www.ur.ch then it is redirected to https://www.ur.ch, which does not exist and therefore produces an ugly SSL_ERROR_BAD_CERT_DOMAIN.

    All eafl-links that point to an https-url work fine.

    Thanks for your help!

    Plugin Author Brecht

    (@brechtvds)

    Try using a plugin like https://ww.wp.xz.cn/plugins/better-search-replace/ to replace the http://www.ur.ch to https://www.ur.ch in the database.

    Brecht

    Thread Starter loolo

    (@loolo)

    No, the correct link is http://www.ur.ch and it is also the link that is specified in eafl.
    How does your plug-in do the redirection? Via java-script? Where can I find the code?

    Plugin Author Brecht

    (@brechtvds)

    Oh, I understand now.

    We don’t use JavaScript put the wp_redirect function to have the redirect as soon as possible.
    You can find the code in the /includes/public/class-eafl-redirect.php file.

    Brecht

    Thread Starter loolo

    (@loolo)

    Hi Brecht

    Thannks for your answer. I couldn’t fix my problem yet. In the .htacess file I’am using the following rewrite rule such that my site is only accessible through https.

    RewriteEngine On
    
    RewriteCond %{HTTP:SSL-HTTPS} !^true$
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [QSA,R=301,L]

    Might this rewriting be the cause, that all the eafl-links includign http are redirected to https? How could I solve my problem?

    Thanks a lot for your help!

    Plugin Author Brecht

    (@brechtvds)

    Is that the cause? If you temporarily rename the .htaccess file does it works then?

    Brecht

    Thread Starter loolo

    (@loolo)

    Thanks for your quick answer. I temporarily commented out the Rewrite section in the .htaccess file, but the problem still occures.

    It seems, that as soon as there is an https:// in the eafl link, for example https://www.mysite.ch/go/ur-1, eafl redirects to https://www.ur.ch instead of http://www.ur.ch as saved as Link URL in the setting of the link.

    Further settings are
    Target: Use Default(Open in new tab)
    Redirect Type: Use Default (301 Permanent)
    No follow: Use Default (Add nofollow attribute)

    What would you try next?

    Thank you very much for your help!

    Thread Starter loolo

    (@loolo)

    I did some further testing. In the redirect function of class-eafl-redirect the correct url (so http://www.ur.ch not https://…) is passed on to wp_redirect($url, $redirect_type). So the problem happens inside the wp_redirect – function. How could i circumvent that?

    Plugin Author Brecht

    (@brechtvds)

    Could you try adding the following code to your theme’s functions.php file and see what the output is when you click on a link that doesn’t work?

    function eafl_test_redirect_location( $location ) {
    	var_dump( $location );
    	die();
    }
    add_filter( 'wp_redirect', 'eafl_test_redirect_location', 99 );

    Make sure to do this via file manager or FTP so you can remove it again afterwards as it breaks all affiliate links and other things.

    Thread Starter loolo

    (@loolo)

    It outputs the link as it is save in the settings of eafl. For the above example it outputs “http://www.ur.ch”.

    Thread Starter loolo

    (@loolo)

    I did a further test: I rewrote redirect function of of class-eafl-redirect.php to

    public static function redirect() {
        header("Location: http://www.ur.ch");
        exit();
    }

    An I get redirected to https://www.ur.ch instead!!

    Is something wrong with a wordpress setting?

    Thank you so much for your help!

    Plugin Author Brecht

    (@brechtvds)

    Then it does send like a .htaccess file or host configuration problem.

    Could you try just renaming .htaccess to .htaccess-bkp to make sure it’s not used?
    Also check for any .htaccess files in potential parent folders.

    Brecht

    Thread Starter loolo

    (@loolo)

    Now the .htacess file only includes

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    I need this part otherwise my wordpress permalinks do not work any more.

    Still getting redirected to https://www.ur.ch

    Plugin Author Brecht

    (@brechtvds)

    Where are you hosted? Have you checked with them?

    Brecht

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘SSL_ERROR_BAD_CERT_DOMAIN’ is closed to new replies.