title: redirect to http to https for multiple domain
body: <p>We have server having 2 domains </p>
  
  <p>1) exmaple.co</p>
  
  <p>2) exmaple.com.au</p>
  
  <p>If User hits first domain "example.co"</p>
  
  <p><code>http://www.exmaple.co</code> OR <code>http://exmaple.co</code> then it should be redirect to </p>
  
  <p><code>https://exmaple.co</code></p>
  
  <p>If User hits second domain "example.com.au"</p>
  
  <p><code>http://www.exmaple.com.au</code> OR <code>http://exmaple.com.au</code> then it should be 
  redirect to </p>
  
  <p><code>https://exmaple.com.au</code></p>
  
  <p>We have purchase SSL.</p>
  
  <p>We have use framework Codeigniter set the coding in htaccess.</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^exmaple.co [NC]
  
  RewriteRule ^(.*)$ http://exmaple.co/$1 [L,R=301]
  
  RewriteCond %{HTTP_HOST} ^exmaple.com.au [NC]
  
  RewriteRule ^(.*)$ http://www.exmaple.com.au/$1 [L,R=301]
  </code></pre>
  
  <p>If i use above code then it's goes on redirect loop. </p>