A
A
avshivtseva2018-11-18 14:09:00
1C-Bitrix
avshivtseva, 2018-11-18 14:09:00

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

4 answer(s)
A
Artem Spiridonov, 2018-11-18
@customtema

And here Bitrix???
What about nginx? It looks like you have a configuration for Apache2, nginx looks different.

A
Alexandra, 2018-11-18
@Aleksa-s

Contact hosting support

I
Igor Petrov, 2018-11-19
@tamerline

Timeweb works like this:

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

S
Sergey, 2021-01-14
@Logic87

If BitrixVM is used, it is enough to create an empty .htsecure file in the site root. In other cases, you need to approach the situation separately by editing .htaccess

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question