Piespiest HTTPS - CSS-triki

Anonim
RewriteEngine on RewriteCond %(HTTPS) !on RewriteRule (.*) https://%(HTTP_HOST)%(REQUEST_URI)

Ja servera priekšā ir starpniekserveris, kas veic TLS pārtraukšanu:

RewriteCond %(HTTP:X-Forwarded-Proto) !https RewriteRule (.*) https://%(HTTP_HOST)%(REQUEST_URI)