Answer the question
In order to leave comments, you need to log in
Full redirect - from HTTP to HTTPS and from WWW to non-WWW at the same time. How to set up HTACCESS Wordpress?
Hey! The situation is this - I'm doing technical optimization of the site on WordPress. I switched the site to HTTPS a week ago. I set up redirects from HTTP to HTTPS and from WWW to non-WWW (hereinafter referred to as "Full redirect").
A full redirect is done only on the main page. It doesn't work for internals. There is a redirect from HTTP to HTTPS and that's it. A full redirect of the inner pages gives whiteness. I went through several dozen code options for HTACCESS with the signatures "It worked", but it doesn't work for me.
I remember there are magic and even free plugins. I installed a couple - Easy HTTPS (SSL) Redirection, http to https forced url. Tuned and shish with oil. Problems with the redirect of internal pages remained.
Help with setting up a Full redirect. If not by code, then by a hint at the place where to dig the essence of the problem. Why does it work for the main page, but not for the rest of the pages?
How to implement: http://www. site .ru/page ---> https: //site .ru/page
Or maybe someone will say that I'm doing nonsense? Comment.
Answer the question
In order to leave comments, you need to log in
And can someone say that I'm doing nonsense?
In the Wordpress settings, in the Site Address field, replace http with https. If the field is inactive, then replace it in the wp-config.php file, replace it in the line
define('WP_HOME', 'http://site.ru/');
define('WP_SITEURL', 'http://site.ru/');
define('WP_HOME', 'https://site.ru/');
define('WP_SITEURL', 'https://site.ru/');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question