"Trop de redirections" UNIQUEMENT en essayant d'accéder à la page wp-admin
6 réponses
- votes
-
- 2018-05-08
J'aitrouvé une solution qui a résolumonproblème.
Sources:
A.) https://sharpten.com/blog/2018/01/17/wordpress-stuck-many-redirects-error-loop-using-ssl.html
B.) (Sublink dans A) https://wordpress.org/support/article/administration-over-ssl/
Extrait: L'ajout des lignes de code suivantes à lafin demonfichier
wp-config.php
a résolu le conflit de redirection.if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
I found a solution that fixed my issue.
Sources:
A.) https://sharpten.com/blog/2018/01/17/wordpress-stuck-many-redirects-error-loop-using-ssl.html
B.) (Sublink within A) https://wordpress.org/support/article/administration-over-ssl/
Excerpt: Adding the following lines of code at the end of my
wp-config.php
file resolved the redirect conflict.if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
-
[Il y a unpluginpour ça] (https://wordpress.org/plugins/cloudflare-flexible-ssl/)[There's a plugin for that](https://wordpress.org/plugins/cloudflare-flexible-ssl/)
- 0
- 2018-05-08
- kero
-
Au cas où quelqu'un d'autretrébucherait là-dessus - ces deux lignes ontfonctionnépourmoi,mais seulement sije les aiplacéesen haut de `wp-config.php`.In case someone else stumbles onto this - those two lines worked for me, but only if I placed them at the top of `wp-config.php`.
- 2
- 2018-11-24
- Marius Bughiu
-
Cette réponsen'apasfonctionnépourmoi.This answer did not work for me.
- 0
- 2019-03-13
- Philippe Delteil
-
Si ci-dessusn'apas aidé,vouspouvezessayer d'ajouter la ligne suivante * ci-dessus *: define ('FORCE_SSL_ADMIN',vrai);et/ou: "SetEnvIf X-Forwarded-Proto https HTTPSen haut" (sansguillemets,en haut dufichier avanttoute autre chose) à votre .htaccessIf above did't help, you may try to add following line *above*: define('FORCE_SSL_ADMIN', true); and/or: "SetEnvIf X-Forwarded-Proto https HTTPS on the top" (without quotes, on the top of the file before anything else) to your .htaccess
- 0
- 2019-04-13
- S1awek
-
Si vous utilisez cloudflare,définissez lemode de cryptage SSL/TLS sur Complet.C'est ça!Il se chargera comme un charme.If you use cloudflare, set SSL/TLS encryption mode to Full. That's it! It will load like a charm.
- 1
- 2019-12-23
- Jakir Hossain
-
Merci!Cela afonctionnépourmoi.Faut-il alors supprimer la ligne ou la conserver?Thanks! This worked for me. Should then the line be deleted or keep it?
- 0
- 2020-02-21
- UXTE
-
Cette réponsen'apasfonctionnépourmoini la solution de @ S1awekThis Answer did not work for me neither solution from @S1awek
- 0
- 2020-04-26
- coderInrRain
-
- 2019-08-16
J'ai utilisé la réponse de Matt ci-dessuset ajouté un autre cas:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; else $_SERVER['HTTPS']='off';
Cela afonctionné.Je l'avais égalementplacé au début du wp-config.php
I used the above answer by Matt and added one else case as well:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; else $_SERVER['HTTPS']='off';
It worked. I had also placed it at the beginning of the wp-config.php
-
travaillé.Il doit également être ajouté à TOP après ` Php`,sinonil donnerait lapermission d'accéder [erreur lors de l'accès à wp-admin] (https://wordpress.stackexchange.com/a/317407/189275)worked. Also it needs to be added to TOP after `
- 0
- 2020-06-02
- Animesh Singh
- 2018-10-30
Mettez ce code dans
wp-config.php
dans lapremière ligne de labalise PHP.if($_SERVER['PHP_SELF']=="/index.php") { define('WP_HOME','https://yourdomain.com'); define('WP_SITEURL','https://yourdomain.com'); } else { define('WP_HOME','http://yourdomain.com'); define('WP_SITEURL','http://yourdomain.com'); }
Maisn'oubliezpas de remplacer l'URL de votre site à laplace de
yourdomain.com
Put this code in
wp-config.php
in the first line inside the PHP tag.if($_SERVER['PHP_SELF']=="/index.php") { define('WP_HOME','https://yourdomain.com'); define('WP_SITEURL','https://yourdomain.com'); } else { define('WP_HOME','http://yourdomain.com'); define('WP_SITEURL','http://yourdomain.com'); }
But don't forget to replace your site URL in the place of
yourdomain.com
- 2019-01-21
D'unemanière ou d'une autre,nos autorisations de dossier wp-admin ont été définies sur 777,ce qui signifie quetout lemondepeut lire,écrire ouexécuter dans ce dossier.
Nousnous sommes connectés au serveuret avonstrouvé uneerreur disant "wp-adminne peutpas être accessibleen écriturepargroupe."
Nous avons changénos autorisations afin que le dossierne soitpas accessibleen écriturepargroupe ouparmonde (755),et la zone d'administration étaitimmédiatement accessible.
(Cettemodification des autorisations s'estproduite demanière aléatoirepournous. L'équipe denotre site Webn'avaitmêmepas accès au serveur aumoment où wp-admin ajuste arrêté defonctionneret nousne savonstoujourspas comment ceparamètre a étémodifié. Le siteétaiten place depuisplusieurs années auparavant.)
Somehow, our wp-admin folder permissions was set to 777, which means everyone can read, write or execute to this folder.
We logged onto the server, and found an error saying "wp-admin cannot be writable by group."
We changed our permissions so the folder was not writable by group or world (755), and the admin area was immediately accessible.
(This permissions change did happen seemingly randomly for us. Our website's team didn't even have access to the server at the time wp-admin just stopped working and we still don't know how this setting was changed. The site had been up for several years beforehand.)
-
J'aieu lemêmeproblèmeet j'aitrouvéplusieurs dossiers avec 775perms: wp-admin,wp-content,wp-includes.Les changeren 755et maintenanten train d'exécuter des analyses de logicielsmalveillantspour s'assurer que rien denéfasten'esten cours.Je vous remercie!I've had the same problem and found several folders with 775 perms: wp-admin, wp-content, wp-includes. Changing them to 755 and now in the process of running malware scans to ensure nothing nefarious is afoot. Thank you!
- 0
- 2019-08-21
- Trane Francks
- 2019-10-01
J'aieu le "Trop de redirections" sur wp-admin uniquement après lamigration vers unnouveau serveur.
Leproblème était des autorisationsincorrectes sur le dossier wp-adminplus lesfichiers deniveau supérieur qu'il contient.La réinitialisation des autorisations a résolu leproblème.
J'espère que cela aideratous ceux quien ontbesoin.
I had the 'Too many redirects' on wp-admin only after migrating to a new server.
The problem was incorrect permissions on the folder wp-admin plus the top-level files within it. Resetting the permissions fixed the issue.
Hope that is of help to anyone who needs it.
- 2019-10-10
Dansmon cas,c'était leproblème
DirectoryIndex
d'Apache.Lewp-admin
était accessibleparwp-admin/index.php
maispasparwp-admin
et affichantERR_TOO_MANY_REDIRECTS
.Il semble que le
DirectoryIndex
d'Apache soit défini «incorrectement».Essayez de réinitialiser celaen haut de votrefichier.htaccess
:DirectoryIndex index.php
Voir la réponse complèteici. Impossible d'accéder autableau debord d'administration avec wp-admin sans/index.php après
In my case it was Apache's
DirectoryIndex
issue. Thewp-admin
was being accessed bywp-admin/index.php
but not withwp-admin
and showingERR_TOO_MANY_REDIRECTS
.It sounds like Apache's
DirectoryIndex
may be set "incorrectly". Try resetting this at the top of your.htaccess
file:DirectoryIndex index.php
See the full answer here. Can't access admin dashboard with wp-admin without /index.php after it
J'aipensé queje poseraismapropre question étant donné que les questionsen doublen'onttoujourspas reçu de réponse.
Pour une raison quelconque,aprèsmanouvelleinstallation de Wordpress 4.9.1 surmon VPS Ubuntu,l'activation demon SSL "flexible" émispar Cloudflare,et enfin le changement d'URL dans Wordpress (depuis " https://foo.com " à " https://foo.com ") Jene peuxplus accéder àmonpanneau d'administration.
Tentative de correctionn ° 1: Suppression des cookies,du cacheet des donnéesenregistrées du (des)navigateur (s), ainsi que des caches Cloudflare.
Tentative de correctionn ° 2: Modifier
wp-config.php
avec le code:Tentative de correctionn ° 3: désactivation dufichier
.htaccess
dans/var/www/html/
Aucune des solutions ci-dessusn'afonctionnéet jene parviensmalheureusementtoujourspas à accéder aupanneau d'administration. Cependant,lapage d'accueilpar défaut de wordpress se chargetrèsbien à labonne URL sécurisée "https".