L
L
lapka-admin2018-05-06 22:11:19
htaccess
lapka-admin, 2018-05-06 22:11:19

How to redirect from https to http?

Tried 2 options, none work

RewriteCond %{HTTP_HOST} ^www.domain.ru$ [NC]
RewriteRule ^(.*)$ http://domain.ru/$1 [R=301,L]

and
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^www.domain.ru$
RewriteCond %{REQUEST_URI} !^domain.ru$
RewriteRule (.*)$ http://domain.ru/$1 [R=301,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-05-07
@shambler81

############################################################################
#### Перенаправляем протокол https на http                              ####
############################################################################
RewriteCond %{ENV:HTTPS} on
   # Проверяем наличие https в URL.
RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
   # Перенаправляем протокол на http.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question