title: remove single link from HTTPS in my .htaccess file
body: <p>I am forcing the entire site to run via <code>HTTPS</code>. I then follow up with forcing <code>www</code> and processing pages through <code>index.php</code> with the following in my <code>.htaccess</code> file.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
    Options +FollowSymlinks
    RewriteEngine On
  
    RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"' [OR]
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ - [env=proto:http]
    RewriteCond %{HTTP:CF-Visitor} '"scheme":"https"' [OR]
    RewriteCond %{HTTPS} =on
    RewriteRule ^(.*)$ - [env=proto:https]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Then below that a ways...</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      #Redirect non-www to www
      RewriteCond %{HTTP_HOST} !^www\.
      RewriteRule ^(.*)$ %{ENV:proto}://www.%{HTTP_HOST}/$1 [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>My issue is that I need to allow pages that come in with say <code>PRD</code> in the <code>URI</code> to go through <code>HTTP</code> and NOT <code>HTTPS</code>.</p>
  
  <p>So <a href="http://www.localsite.com/index.php?PRD=123" rel="nofollow noreferrer">http://www.localsite.com/index.php?PRD=123</a></p>
  
  <p>Would not go to https while every other link would.</p>
  
  <hr>
  
  <p><strong>* EDIT *</strong></p>
  
  <hr>
  
  <p>I'll try to clarify a bit more. I tried to catch the redirect/rewrite before any others, but it still loops between the following:
  <code>http://www.local.com/index.php?PRD=123</code>
  <code>https://www.local.com/index.php?PRD=123</code></p>
  
  <p>This tells me that it IS catching it, but for some reason the second set of rules are redirecting still too. </p>
  
  <p>I placed the following (I'm leaving other attempts commented out in case they are better?) above the first two, turned on the engine, and moved the Options in with this.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      Options +FollowSymlinks
      RewriteEngine On
  
      RewriteCond %{QUERY_STRING} ^PRD=([0-9]+) [NC]
      #RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
      #RewriteRule ^ http://%{HTTP_HOST}/$1 [R=301,L]
      #RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php$1 [R=301,L]
      RewriteRule ^ http://%{HTTP_HOST}/index.php$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I have also tried placing everything in one block using this:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      Options +FollowSymlinks
      RewriteEngine On
  
      #Redirect non-www to www
      RewriteCond %{HTTP_HOST} ^local.com [NC]
      RewriteRule ^(.*)$ http://www.local.com/$1 [L,NC]
  
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  
      RewriteCond %{HTTPS} off
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L]
  
      #Redirect singular segments first
      RewriteCond %{QUERY_STRING} ^PRD=([0-9]+) [NC]
      RewriteRule ^(.*)$ http://www.local.com/$1 [L]
  &lt;/IfModule&gt;
  </code></pre>