title: Change http requests to https using .htaccess file in Zend framework 2.0
body: <p>I have an application written in Zend Framework 2.0. The ssl certificate has been configured in the production site. HTTPS requests made by the user is fine. I want to change all the HTTP requests made by the users to HTTPS.</p>
  
  <p>I used the code written below in my .htaccess file inside public folder (in IIS server).</p>
  
  <pre><code> RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^.*$ index.php [NC,L]
  
      RewriteCond %{HTTPS} !=on
      RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  </code></pre>
  
  <p>But, the problem is Let I type the URL <a href="http://carecenter.helptocare.com" rel="nofollow">http://carecenter.helptocare.com</a>. It's changing to <a href="https://carecenter.helptocare.com/carecenter/public/index.php" rel="nofollow">https://carecenter.helptocare.com/carecenter/public/index.php</a>.</p>