.htaccess for HTTP redirect to HTTPS
# .htaccess in your webroot
RewriteEngine On
# If not already HTTPS…
RewriteCond %{HTTPS} !=on
# …and not marked HTTPS by a proxy/load balancer
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTP:Forwarded} !proto=https
# Redirect to same host+path on HTTPS
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
No comments to display
No comments to display