0
votes

I have this issue with WordPress site that uses Polylang Plugin. I have redirected all traffic to https version with .htaccess like this:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

After I changed the "default language" setting in Polylang, I started getting "Too many redirects" error. If I remove the above lines from .htaccess, the error goes away.

Is there a way to force all traffic to https version while using Polylang?

2

2 Answers

0
votes

Multilanguage plugins have redirects of their own, which in this case probably causes the loop. If you re-save the settings of the polylang plugin, it should be fixed.

Removing the .htaccess redirects of Really Simple SSL is not necessary.

0
votes

Managed to resolve this by forcing ssl in functions.php instead.

if($_SERVER["HTTPS"] != "on")
{
    header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    exit();
}