Running WP in a subdirectory nginx, wp-admin too many redirects

Hi Clay!
Thank you for looking into that.

Alas, we already did what you suggested.
Actually, that happens to be the procedure suggested by WordPress in the Codex (method 2) in order to have your website in a subfolder of public_html.

However, I noticed that new SSL installations in Local have the following snippet in wp-config.php:

/* Inserted by Local by Flywheel. See: http://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy */
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
	$_SERVER['HTTPS'] = 'on';
}

Including the snippet in the wp-config.php of my existing WordPress installation made it work again!

I suspect that Local inserts the snippet automatically when the certificate is trusted; I guess somehow the insertion didn’t work on my wp-config.php.

Thank you for your help!
Best wishes,
Guido

4 Likes