I'm having a problem trying to force https on my website while excluding locahost I'm currently using Intelligencia.UrlRewriter to rewrite any urls and I have the following rule set up:
<if header="HTTPS" match="^OFF$">
<redirect url="(.*)" to="https://sub.mydomain.com$1" />
</if>
This redirects fine, but I would like to make sure that my localhost debugging is not affected. This obviously runs under a different URL. So I tried:
<if header="HTTPS" match="^OFF$">
<redirect url="(.*)mydomain" to="https://sub.mydomain.com$1" />
</if>
This however does not work. I believe the reason for that might be that it only evaluates anything after the .com. I have tried searching for documentation with no luck.
How can I always force https connection except on my localhost?