title: POST becomes GET after htaccess directives
body: <p>I am hiding the php file extention using the below directives in Apache htaccess file</p>
  
  <pre><code>RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
  RewriteRule ^ %1 [R,L,NC]
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^ %{REQUEST_URI}.php [L]
  </code></pre>
  
  <p>I have a simple html form like this</p>
  
  <pre><code>&lt;form action="register.php" method="post"&gt;
    &lt;input type="text" name="name"&gt;
    &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And in my PHP page this is how I was earlier checking whether the form has been posted</p>
  
  <pre><code>if ($_SERVER["REQUEST_METHOD"] == "POST") {
  /* code to process the post */
  }
  </code></pre>
  
  <p>But since I added the htaccess directives to hide the php filename extensionthe "POST" becomes "GET" and the above code never executes. Is there a good way to handle this? I know it is the internal redirect that causes this but is there an elegant way to handle this? I don't want to use the below method for obvious reasons</p>
  
  <pre><code>if (isset($_POST['submit'])) {
  </code></pre>