Bắt buộc HTTPS - Thủ thuật CSS

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

Nếu bạn có một proxy phía trước máy chủ của mình thực hiện kết thúc TLS:

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