title: can't submit a form via POST with PHP over SSL
body: <p>I can't seem to submit a form via POST with PHP over SSL.   Here's a quick look at my code, can anyone tell me what's wrong?</p>
  
  <p>My .htaccess file</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /test
  
  RewriteCond %{HTTP_HOST} !^www\.helloworld\.org$ [NC]
  RewriteRule ^(.*)$ http://www.helloworld.org/test/$1 [L,R=301]
  
  # If i comment out these 3 lines, everything works fine
  RewriteCond %{HTTPS} off
  RewriteCond %{REQUEST_URI} (myaccount|register|registration|login)
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteCond $1 !^(index\.php|images|robots\.txt)
  RewriteRule ^(.*)$ index.php/$1 [L]
  </code></pre>
  
  <p>Here's index.php</p>
  
  <pre><code>&lt;?php $myurl = "http://www.helloworld.org".$_SERVER['REQUEST_URI']; ?&gt;
  &lt;form method="post" action="&lt;?=$myurl ?&gt;"&gt;
  &lt;input name="text" /&gt;
  &lt;input type="submit" /&gt;
  &lt;?php print_r($_POST); ?&gt;
  </code></pre>
  
  <p>I take the following actions:</p>
  
  <p>1) Go to <a href="http://www.helloworld.org/test/login/" rel="nofollow noreferrer">http://www.helloworld.org/test/login/</a>  (my browser will then automatically show the https version)</p>
  
  <p>2) I type something into the form and hit the submit button</p>
  
  <p>3) The print_r($_POST) prints nothing!  I expected it to be populated!</p>
  
  <p>If I comment out the three lines in the .htaccess file related to the HTTPS and repeat the same experiment, then the print_r($_POST) gives me the results of the form submission.</p>
  
  <p>How do i make my form post work all the time?</p>