wordpresshttp-status-code-302wp-adminhttp-status-code-307

Wordpress is redirecting 302-307 in loop


I was setting up End-to-end Cloudflare for my VPS running Wordpress. Having problem accessing wp-admin, loops in redirects.

By perusing google I have tried many things and it lead me to final point where 302 loops with 307. So https is redirecting to http and back to https again and again. enter image description here

Can anyone explain how in the this world does wp-admin page redirect itself twice ? Where are the php rules which guide such behavior?

Thanks for help.


Solution

  • Set Flexible encryption mode, configure Cloudflare to https only and in wp-config set

    define('FORCE_SSL_ADMIN', false);
    define('FORCE_SSL_LOGIN', false);