RewriteEngine on RewriteCond %(HTTPS) !on RewriteRule (.*) https://%(HTTP_HOST)%(REQUEST_URI)
Ako ispred poslužitelja imate proxy koji izvršava TLS prekid:
RewriteCond %(HTTP:X-Forwarded-Proto) !https RewriteRule (.*) https://%(HTTP_HOST)%(REQUEST_URI)