fevangelou
3/13/2016 - 9:40 AM

Force redirect page to HTTPS except when on a localhost/dev environment

Force redirect page to HTTPS except when on a localhost/dev environment

<!-- Force redirect to HTTPS -->
<script>if(!(window.location.host.startsWith("127.0.0.1") || window.location.host.startsWith("localhost")) && (window.location.protocol!="https:")) window.location.protocol="https:";</script>