0
<html>
    <head>
    <script src="jquery-3.1.1.min.js"></script>
    <script>
     if (location.protocol != 'https:')
        {
         location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
        }
    </script>
    </head>
    <body>
            <span class="sample">hi</span>
    </body>
</html>

I need to change the protocol in url. I placed the sample.html in apache htdocs. I am hitting with http it changing to https but site cannot be reached using https. could any one provide me solution

Mahi
  • 69
  • 2
  • 8

0 Answers0