title: RewriteRule does not work for HTTPS pages
body: <p>I have recently moved from HTTP to HTTPS and there are some specific pages that need to be redirected. The http pages redirect but the https pages do not. I have created a test environment and a simplified htaccess with just two simple rewrites – one specifically for HTTP and one specifically for HTTPS. The htaccess file is in the test folder. </p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule ^test1.html$ https://www.example.com/test/test1new.html? [L,R=301]
  RewriteCond %{HTTPS} on
  RewriteRule ^test1.html$ https://www.example.com/test/test1new.html? [L,R=301]
  </code></pre>
  
  <p>Here's what happens:<br>
  <a href="http://www.example.com/test/test1.html" rel="nofollow noreferrer">http://www.example.com/test/test1.html</a>  =>  redirected to:  <a href="https://www.example.com/test/test1new.html" rel="nofollow noreferrer">https://www.example.com/test/test1new.html</a></p>
  
  <p>The https test1 page is not redirected.</p>
  
  <p>So HTTP works and HTTPS does not. For some reason, https pages cannot be redirected. I have performed the same tests on two other hosts and I always get the same thing. Is there a reason https redirects are being ignored? What can be done to make this work?</p>
  
  <p>Thank you very much.</p>