.htaccess redirect to https
RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} !/robots\.txt RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Другой вариант, подходит для sweb.ru
RewriteEngine On RewriteCond %{HTTP:HTTPS} !=on [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] SetEnvIf X-Forwarded-Proto https HTTPS=on
Подходит для nic.ru или infobox.ru
RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{REQUEST_URI} !/robots\.txt RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Подходит для jino.ru
RewriteCond %{HTTP:X-Forwarded-Protocol} !=https RewriteCond %{REQUEST_URI} !/robots\.txt RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]