Whenever someone makes request over HTTP protocol I rewrite the url to make it HTTPS. This is the code in web.config:
&
The matches are zero based.
Won't work because you only have one match. You need:
Also, this won't work, because you can only match on the path below the site root.
It looks like you are checking for ssl. Try this instead: