title: Apache .htaccess, url rewriting issue
body: <p>I hosted my python flask web app to fluxflex cloud hosting (Apache, FastCGI). So, .htaccess file looks like the following:</p>
  
  <pre><code>RewriteEngine On
  AddHandler fcgid-script .fcgi
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ /dispatch.fcgi/$1 [QSA,L]
  </code></pre>
  
  <p>It works. Now I want to redirect from http to https. How can I do that? Added the following 
  two lines at the end of .htaccess:</p>
  
  <pre><code>RewriteCond %{HTTP:X-Forwarded-Proto} !https
  RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
  </code></pre>
  
  <p>but, got response: Error 310 (net::ERR_TOO_MANY_REDIRECTS). If I insert this two lines before the first rewrite, response is: Page Not Found.</p>
  
  <p>Can someone show me proper way of redirecting to https?</p>