HTTPS с исключением robots.txt


RewriteEngine on
RewriteCond %{HTTP:HTTPS} !=on [NC]
RewriteCond %{THE_REQUEST} !/(robots\.txt|sitemap\.xml)\s [NC]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,NE,R=302]
SetEnvIf X-Forwarded-Proto https HTTPS=on