Redirect from http to https behind a network loadblancer

43 views Asked by At

I am trying to redirect http trafic from http to https on ec2 behind a network load balancer using htaccess

# aws rule for http to https
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

Above code does not work because network loadbalancer does not add x-forwarded header.

0

There are 0 answers