title: Apache redirect from http to https
body: <p>I have a small issue, </p>
  
  <p>I am working on an apache2 server where I have to redirect all http requests to https. </p>
  
  <p>Here is code i have written in VH's conf file</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  </code></pre>
  
  <p>Its seems to be working fine with no issues at all. </p>
  
  <p>Now, the problem is that, we also have an mobile app communicating with our server. This mobile app is communicating over a REST based POST API. The mobile app already in play store and still communicates with our server over HTTP only. Now, because of this redirection set, the server redirects the mobile request to Https, but fails to pass the POST parameters. Can any one suggest me a solution here? Is there any way I can only redirect web requests and let the requests coming from mobile comunicate over http only. Need help and suggestions. </p>