Answer the question
In order to leave comments, you need to log in
Redirect from http to https on Bitrix?
I'm doing a 301 redirect from http:// to https:// and it keeps coming up - The site has redirected too many times, why is that? Is this not related to nginx config?
Tried all four
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} =off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://% {HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{ENV:HTTPS} !on
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Answer the question
In order to leave comments, you need to log in
And here Bitrix???
What about nginx? It looks like you have a configuration for Apache2, nginx looks different.
Timeweb works like this:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question