title: HTTP to HTTPS Redirect Causes POST to GET
body: <p>I've set up a general http to https redirect in my ubuntu virtual host file as shown below:</p>
  
  <pre><code>NameVirtualHost *:80
  NameVirtualHost *:443
  
  &lt;VirtualHost *:80&gt;
      #UseCanonicalName Off
      #ServerName test.example.com
      #ServerAdmin webmaster@localhost
      #DocumentRoot /var/www/test.example.com/web
      RewriteEngine on
      ReWriteCond %{SERVER_PORT} !^443$
      RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:443&gt;
      UseCanonicalName Off
      ServerName test.example.com
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/test.example.com/web
      SSLEngine on
      SSLCertificateFile /etc/ssl/bcerts/b.crt
      SSLCertificateKeyFile /etc/ssl/bcerts/b.key
      SSLCertificateChainFile /etc/ssl/bcerts/b.ca-bundle
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>The above confirguration works fine except I have http POST requests that aren't SSL coming from an iOS app that get converted into http GET requests (presumably because a 302 request will always do this).  However, I need the apache config to allow for http POST requests to remain http POST requests without changing the iOS app code.  Any configuration that allows this?</p>