title: how in htaccess can i redirect the user to https from http and back again
body: <p>I'm trying to get a login page to redirect to https and all other pages revert to standard http. When I have /login as the address, it shows up as /index.php?page=login and isn't displayed on a secure page.</p>
  
  <p>The htaccess code in question is below :</p>
  
  <pre><code>RewriteCond %{SERVER_PORT} 80 
  RewriteCond %{REQUEST_URI} ^/login$
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
  
  RewriteCond %{REQUEST_URI} !^/login$
  RewriteCond %{SERVER_PORT} 443 
  RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
  
  RewriteRule ^([a-zA-Z0-9_\-\(\)]+)[/]?$ /index.php?page=$1
  </code></pre>