This question is somewhat related to my previous question. The trick of using $_SERVER['REDIRECT_QUERY_STRING']
seems to work only for $_GET
variables.
Well, I've an index.php
file which handles all the 404 redirects
.
If a user requests for a page which doesnt exist, say, apple.php?item=23
, then using $_SERVER['REDIRECT_QUERY_STRING']
I can get the $_GET
variable item=23
, but if the variable is not $_GET
but $_POST
then $_SERVER['REDIRECT_QUERY_STRING']
doesn't work.
How can I get $_POST
variable when I redirect it to index.php
using the following .htaccess setting
ErrorDocument 404 /index.php