title: IIS 7 Rewrite Rule with SSL Redirect
body: <p>I am having and problem using IIS Rewrite rules to handle all scenarios of redirecting an old domain to my newdomain and newly enforcing a SSL connection.</p>
  
  <p>Here are the rules as I have them configured now.</p>
  
  <p><img src="https://i.stack.imgur.com/gt5GP.png" alt="Code"></p>
  
  <p>So what does work is when a user enters in the old domain using http://
  Also, If a use enters in the newdomain using http://</p>
  
  <p>What does not work is when a user enters in the olddomain using https://
  The user is presented with the error "SSL cert does not match the domain".</p>
  
  <p>Any one have any thoughts on how to combine both these rules to handle all scenarios.</p>