RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/bitrix/admin/1c_exchange\.php$ [NC]
RewriteCond %{REQUEST_URI} !^/robots.txt$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L,QSA]
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(/bitrix/admin/1c_exchange\.php)$ http://%{HTTP_HOST}/$1 [R=301,L,QSA]
RewriteRule ^(/robots.txt)$ http://%{HTTP_HOST}/$1 [R=301,L,QSA] |