Redirect from http to https through web.config rewrite rule; May use this for specific domain(s). Below rule will keep the query string data intact while redirecting.
Apply below changes in web.config file.

<system.webServer>
  ......
    <rewrite>
      <rules>
	    <rule name="HTTP to HTTPS redirect" enabled="true">
	      <match url="(.*)" />
	      <conditions>
		    <add input="{HTTP_HOST}"  pattern="^(www\.mydomain\.com|www\.checkoutall\.com)$" ignoreCase="true" />
		    <add input="{HTTPS}" pattern="off" ignoreCase="true" />
	      </conditions>
	      <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
	    </rule>
      </rules>
    </rewrite>
  ......
</system.webServer>

 

Discussion
6 X 9 =
** To prevent abusing comments from publishing, posted comments will be reviewed and then published!
 Mritunjay Kumar
Works at Mindfire Solutions

I mostly work with C#, ASP.NET, MVC, WCF, Web API, Entity FrameWork, MS Sql.

More under this category...
Calling Javasccript code on partial post back through update panel.
All under this category...