Skip to content

Instantly share code, notes, and snippets.

@Korveld
Last active January 29, 2021 14:19
Show Gist options
  • Select an option

  • Save Korveld/f2675cf6c3b22f1b2998b9df4db34a37 to your computer and use it in GitHub Desktop.

Select an option

Save Korveld/f2675cf6c3b22f1b2998b9df4db34a37 to your computer and use it in GitHub Desktop.
Wordpress err_too_many_redirects error fix
Добавьте в wp-config.php в самое начало (после <?php ):
$_SERVER['HTTPS'] = 'on';
define( 'FS_METHOD', 'direct' );
define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');
Плюс пониже после define всяких (до текста "/* Это всё, дальше не редактируем. Успехов! */"):
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment