There are two domains: http://one.ru and http://two.ru . When you go to them, we immediately go to http s : //one.ru and http s : //two.ru.

SetEnvIf X-HTTPS 1 HTTPS RewriteEngine On RewriteBase / RewriteCond %{HTTP:X-HTTPS} !1 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] 

How to change .htaccess so that when you switch to http://two.ru there is no redirection to HTTPS.

    1 answer 1

    Used this:

     RewriteRule http://one.ru/$ https://%{HTTP_HOST}/$1 [R=301,L]