How to switch from http to https client side
<p>How to switch from http to https in a client side script. Do not change the URL <strong>otherwise</strong>. It should do nothing in https. The server replies the same to http and https. I need the rest of the Original URL to stay intact.</p>

<pre><code>http://example.com --&gt; https://example.com
http://example.com/a --&gt; https://example.com/a
http://example.com/b --&gt; https://example.com/b
</code></pre>