I am hosting a wordpress site on AWS and am transitioning from http to https. After reading some resources from online I added this line to the wp-config.php
file:
define('FORCE_SSL_ADMIN', true);
Now when i try to access the /wp-admin/
page I get the xx.xx.com redirected you too many times
. The all of the other pages work, it is only the admin panel that is not working.
For anyone coming here like me being behind a reverse proxy that handle the SSL stuff, it took me a while but I could find the documentation where it states what has to be done:
https://codex.wordpress.org/Administration_Over_SSL
It states to add an if in the wp-config:
As I don’t like to touch the config (mostly because I forget I touched it) I tried to find a more elegant way of doing it:
https://wordpress.org/plugins/ssl-insecure-content-fixer/
I have tried with this plugin and it works.
It happened to me sometimes. Try checking between which pages the redirect occurs here:
redirect-checker.org
It will help you understand why it happens
If the problem is about a loop between http://example.com and https://example.com you can try changing homeurl and siteurl to avoid this redirect. You can do this:
define('WP_HOME','http://example.com');
in wp-config.php (check here)define('WP_SITEURL','http://example.com');
Hope it helps