You are here

Need to redirect all traffic to https (better solution)

rewriteCond %{HTTPS} !on
rewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
code type: 
Taken from: 
https://stackoverflow.com/questions/3239739/need-to-redirect-all-traffic-to-https