title: Permanent redirect from http to https page
body: <p>When I try to create rules for redirect from HTTP pages to HTTPS pages (only for specific pages) with .htaccess, I've received loop redirect. Where am I wrong?</p>
  
  <pre><code>Options +FollowSymLinks
  RewriteEngine On
  
  RewriteCond %{HTTPS} !on
  RewriteCond %{REQUEST_URI} ^(/doctor) [NC, OR]
  RewriteCond %{REQUEST_URI} ^(/client)
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
  
  RewriteCond %{HTTPS} on
  RewriteCond %{REQUEST_URI} !^(/doctor) [NC, OR]
  RewriteCond %{REQUEST_URI} !^(/client)
  RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]
  </code></pre>