title: How to get `$_POST` query when 404 redirected through .htaccess?
body: <p>This question is somewhat related to my <a href="https://stackoverflow.com/questions/10366139/how-to-pass-query-string-in-404-error-redirect-through-hacces">previous question</a>. The trick of using <code>$_SERVER['REDIRECT_QUERY_STRING']</code> seems to work only for <code>$_GET</code>  variables.</p>
  
  <p>Well, I've an <code>index.php</code> file which handles all the <code>404 redirects</code>.</p>
  
  <p>If a user requests for a page which doesnt exist, say, <code>apple.php?item=23</code>, then using <code>$_SERVER['REDIRECT_QUERY_STRING']</code> I can get the <code>$_GET</code> variable <code>item=23</code>, but if the variable is not <code>$_GET</code> but <code>$_POST</code> then <code>$_SERVER['REDIRECT_QUERY_STRING']</code> doesn't work.</p>
  
  <p>How can I get <code>$_POST</code> variable when I redirect it to <code>index.php</code> using the following .htaccess setting</p>
  
  <blockquote>
    <p>ErrorDocument 404 /index.php</p>
  </blockquote>