title: .htaccess HTTPS redirect except one page laravel
body: <p>I want to redirect all HTTPS requests to HTTP except urls that contain this string:
  "/account/buy-premium"</p>
  
  <p>Here is my .htaccess file:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{REQUEST_URI} ^/account/buy-premium [NC]
  RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  
  RewriteCond %{HTTPS} on
  RewriteCond %{REQUEST_URI} !^/account/buy-premium [NC]
  RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  
  # Redirect Trailing Slashes...
  RewriteRule ^(.*)/$ /$1 [L,R=301]
  
  # Handle Front Controller... Default Laravel conf
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
  </code></pre>
  
  <p><strong>https:// example.com/test-page</strong> is redirecting to <strong>http:// example.com/test-page</strong> (good)</p>
  
  <p>But</p>
  
  <p><a href="https://example.com/account/buy-premium/991" rel="nofollow">https://example.com/account/buy-premium/991</a> is redirecting to <a href="http://example.com/index.php" rel="nofollow">http://example.com/index.php</a> (bad - no redirect is needed here)</p>
  
  <p>I cannot find any solution to prevent redirect for the /buy-premium page<br>
  Please help</p>