Question
When Pointing From http//www To https//www Appear Redirect Loop
Hello everyone.
I have some strange issue related to the redirect loop appearing.
For example, my website is https://www.test.org/ in the website general setting I have the same address:https://www.test.org/ in digitalocean domain setting I add that:
test.org is posting to IP
wwww.test.org is posting to the same IP
also in this file 000-default.conf (folder site enabled) I have those lines:
RewriteEngine on
RewriteCond %{SERVERNAME} =www.test.org [OR]
RewriteCond %{SERVERNAME} =test.org
RewriteRule ^ https://%{SERVERNAME}%{REQUESTURI} [END,NE,R=permanent]
and in the .httaces file, I have nothing.
*But when I enter to the browser this one http://www.test.org/ I have those redirect chains: *
http://www.test.org/ 301 redirect to https://test.org/ 301 redirect to https://www.test.org/
Somebody could help how to avoid the second unnecessary chain element in order to get the redirect from http://www.test.org/ directly here: https://www.test.org/ and from http://test.org/ also directly here https://www.test.org/
Many thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×