I am trying to have all my http traffic redirect to https.
I have this in my httpd.conf file, but it results in a redirect loop error when you try to access any page:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/
ServerName example.com
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
What could be causing this?
This is on EC2, Apache, Linux.
Aucun commentaire:
Enregistrer un commentaire