title: How to configure Codeigniter for HTTPS (SSL)?
body: <p>I have a Codeigniter application which was developed and tested on the normal http. Now the Apache server has been configured in such a way that all of the pages are stored in a single folder which is SSL enabled. The SSL certificate is in place. When I browse to the website using "<a href="https://www" rel="nofollow noreferrer">https://www</a>" then it redirects to "<a href="http://www" rel="nofollow noreferrer">http://www</a>". </p>
  
  <p><strong>NOTE : I do not need to load specific pages using SSL. I just need all pages to show as HTTPS</strong>.</p>
  
  <p>I have tried the proposed solutions suggested on Stack Overflow including :</p>
  
  <ol>
  <li>Modifying the .htaccess file to force HTTPS</li>
  <li>Setting the <code>$config['base_url'] = "https://www.yoursite.com/"</code>;</li>
  </ol>
  
  <p>When I tried the above method in tandem then Firefox gave the following error : </p>
  
  <blockquote>
    <p>The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.</p>
  </blockquote>
  
  <p>Many Stack Overflow contributors suggest that this should be handled by Apache only. That makes sense to me but forcing HTTPS via .htaccess gives the same error.</p>
  
  <p>Is there a simple way to do this without hooks and SSL Helpers, etc?</p>