title: http to https through .htaccess
body: <p>I've had a look through existing questions, but I haven't really come across anything which works for me.</p>
  
  <p>I'm currently running a site with a Secure SSL certificate. It can be accessed at <a href="https://www.example.co.uk" rel="noreferrer">https://www.example.co.uk</a> a problem is the site can also be accessed at <a href="http://www.example.co.uk" rel="noreferrer">http://www.example.co.uk</a> - I don't want this to be possible. I need it to redirect from http to https.</p>
  
  <p>I found this one snippet of code to use in an .htaccess file.</p>
  
  <pre><code>Options +FollowSymLinks 
  RewriteEngine on 
  RewriteCond %{HTTP_HOST} ^example.co.uk [NC] 
  RewriteRule ^(.*)$ https://example.co.uk/$1 [L,R=301]
  </code></pre>
  
  <p>This works fine when the user enters example.co.uk into their address bar, but I also need to add a conditional statement of some sort so that if the user enters 'www.example.co.uk' or '<a href="http://www.example.co.uk" rel="noreferrer">http://www.example.co.uk</a>'. </p>
  
  <p>I've tried using the likes of [OR], but this ends up creating server errors.</p>
  
  <p>Any help and suggestions is appreciated.</p>
  
  <p>Cheers.</p>