title: Redirecting https://server.com to https://www.server.com in apache
body: <p>I am trying to write a redirect in apache for URL of pattern:</p>
  
  <p><code>https://server.com</code> to <code>https://www.server.com</code></p>
  
  <p>without much success</p>
  
  <p><strong>Reason for rediect</strong>: My SSL certificate is on <code>www.server.com</code>, so I want the users to go on the correct site (and see secure icon).</p>
  
  <p><strong>Problem</strong>: The problem is that when I try to open <code>https://server.com</code> the browser gives me incorrect certificate error and none of my RewriteRule gets executed till I ignore the incorrect certificate problem.</p>
  
  <p>How do I redirect in this case?</p>