0

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?

Demeter
  • 106
  • 1
  • 8

2 Answers2

0

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.

Mo'men Mohamed
  • 1,851
  • 20
  • 24
0

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();
}
Demeter
  • 106
  • 1
  • 8