Http version not redirecting completely After changing url to https
-
I want to redirect my all traffic to https://example.com version of my site. First I am changing http to https in “settings > general”. Then adding a redirect in .htaccess file. But wherever I am adding redirection code in .htaccess file my site stop working and browser shows too many http redirect error.
I have tried all possible http to https redirect code in .htaccess file but nothing worked. I have tried clearing website cache, browser cache but no result.
Finally I removed redirect code from .htaccess file and added my site url with https in wp-config file. See the code below..
define( ‘WP_HOME’, ‘https://example.com’ );
define( ‘WP_SITEURL’, ‘https://example.com’ );
$_SERVER[“HTTPS”] = “on”;After adding above 3 lines my site is working but problem is only https://example.com not redirecting to https://example.com. Otherwise everything redirecting to https://example.com.
My website is https://www.digitalpromit.com
Please solve this problem.
The page I need help with: [log in to see the link]
- The topic ‘Http version not redirecting completely After changing url to https’ is closed to new replies.