I'm trying to redirect http to https on an AWS server.
I tried the following htaccess syntax, nothing works:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
And
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
The website still loads with http, how can I fix that?
AllowOveride All- this is activated, yes?RewriteCond %{HTTPS} offtoRewriteCond %{HTTPS} !ondo you get a redirect loop?