I tried all the ways to skip this problem , my website on wordpress and I keep getting There is 1 redirect
/ redirects to /
I change my site to on phpmyadmin and I have this code on .htaccess
#redirect non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
and this code on wp-config :
define('WP_HOME','');
define('WP_SITEURL','');
and I still this error
I tried all the ways to skip this problem , my website on wordpress http://www.b-secrets.ro and I keep getting There is 1 redirect
http://b-secrets.ro/ redirects to https://www.b-secrets.ro/
I change my site to http://wwwb-secrets.ro on phpmyadmin and I have this code on .htaccess
#redirect non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
and this code on wp-config :
define('WP_HOME','http://www.b-secrets.ro');
define('WP_SITEURL','http://www.b-secrets.ro');
and I still this error
Share Improve this question edited Mar 19, 2019 at 21:00 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Mar 19, 2019 at 20:00 Mohd AljarabaMohd Aljaraba 11 bronze badge 5- Have you tried clearing your browser's history completely, or checking with a HTTP header checker? Browsers cache redirects, so even if your update was successful, your browser may just be showing you what it saved previously. – WebElaine Commented Mar 19, 2019 at 20:02
- I got this error Redirect type 301 Moved Permanently – Mohd Aljaraba Commented Mar 19, 2019 at 20:34
- b-secrets.ro [301] – Mohd Aljaraba Commented Mar 19, 2019 at 20:34
- b-secrets.ro [200] – Mohd Aljaraba Commented Mar 19, 2019 at 20:34
- A 301 is a status, not an error. The non-www link you posted takes the visitor to the www version as intended. Where is it you're seeing the text that it is 301 redirected? – WebElaine Commented Mar 19, 2019 at 20:47
1 Answer
Reset to default 0The 301 redirect is from http://
to https://
.
Your rewrite rule specifies https://
while your WP_HOME
and WP_SITEURL
are set to use http://
.
That's why you're seeing the 301 redirect from http://www.b-secrets.ro
to https://www.b-secrets.ro
.