Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Force HTTPS
- RewriteEngine On
- RewriteCond %{SERVER_PORT} ^80$
- RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
- # Force HTTPS without the "Too many redirects" error when behind proxy
- RewriteEngine On
- RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
- RewriteCond %{HTTP:X-Forwarded-Proto} =""
- RewriteCond %{HTTPS} !=on
- RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement