JS

how to redirect http to https using javascript

Pinterest LinkedIn Tumblr

<script>
if (location.protocol != ‘https:’)
{
location.href = ‘https:’ + window.location.href.substring(window.location.protocol.length);
}
</script>

Write A Comment

Faster PHP Cloud Hosting