title: How to automatically redirect HTTP to HTTPS on Apache servers?
body: <p><em>Environment</em> Centos with apache</p>
  
  <p>Trying to setup automatic redirection from http to https</p>
  
  <pre><code>From manage.mydomain.com --- To ---&gt; https://manage.mydomain.com 
  </code></pre>
  
  <p>I have tried adding the following to my httpd.conf but it didn't work</p>
  
  <pre><code> RewriteEngine on
      ReWriteCond %{SERVER_PORT} !^443$
      RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
  </code></pre>
  
  <p>Any ideas? </p>