Last active
March 26, 2019 16:56
-
-
Save ahmed-abdelazim/953f2f71f2447037f5f7ed20f78310e0 to your computer and use it in GitHub Desktop.
Fix HTTPS WordPress login to the admin panel redirect loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // add these lines on the top of the file wp-config.php | |
| define('WP_SITEURL', 'https://aasmouha.com'); | |
| define('WP_HOME', 'https://aasmouha.com'); | |
| define('FORCE_SSL_ADMIN', true); | |
| define('FORCE_SSL_LOGIN', true); | |
| if( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) | |
| $_SERVER['HTTPS']='on'; | |
| php?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment