title: IIS Rewrite Rule - redirect specific HTTP page
body: <p>here is my rule:</p>
  
  <pre><code>&lt;rule name="RedirectHttps04" stopProcessing="true"&gt;
  &lt;match url="(.*)" /&gt;
  &lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false"&gt;
  &lt;add input="{REQUEST_URI}" pattern="^some-url-here$" /&gt;
  &lt;add input="{HTTPS}" pattern="^off$" /&gt;
  &lt;/conditions&gt;
  &lt;action type="Redirect" url="https://www.example.com/some-url-here" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>With the above rule I would like to redirect a specific URL to https and keep all the other ones as they are.</p>
  
  <p>So when user goes to:</p>
  
  <pre><code>www.example.com/some-url-here
  http://example.com/some-url-here
  http://www.example.com/some-url-here
  </code></pre>
  
  <p>I would like them to be redirected to:
  <a href="https://www.example.com/some-url-here" rel="nofollow noreferrer">https://www.example.com/some-url-here</a></p>
  
  <p>But, after going through many versions and options available here - non of them worked, after reading multiple articles I don't see why the rule above doesn't work (doesn't redirect).
  I'm using IIS 8.5.96</p>
  
  <p>More info:
  {HTTPS} parameter appears to be always "off"
  {HTTP} is either "" for http or "off" for https, but even so the rule doesn't work</p>
  
  <p>I have set to redirect to test.html?p={CACHE_URL} and both appears to take me to test.html?p=<a href="http://example.com" rel="nofollow noreferrer">http://example.com</a></p>
  
  <p>The only thing I have that works is a rule which appends parameter at the end if it's not appended, a very ugly hack but ensures user ends up on https :/ </p>