Re: ErrorDocument 404 & Form

From: Date: Thu, 18 Jul 2002 10:56:09 +0000
Subject: Re: ErrorDocument 404 & Form
References: 1 2  Groups: php.general php.general 
Request: Send a blank email to php-general+get-108238@lists.php.net to get a copy of this message
In article <plop87znwq2bb3.fsf@linuxfr.org>, penso@linuxfr.org says... > > Tom a écrit : > > > Actaully, neither Apache or PHP is at fault. The ErrorDocument (either in > > httpd.conf or an .htaccess file) follows absolute paths, so you are calling > > your engine.php out of the root directory of the machine. So the question > > is, do you have engine.php in the / folder? If not you can put it there or > > just adjust your ErrorDocument command to point to the path of the file. > > No, you didn't understand. I'll make a simpler example. Let's say I did > use : > > ErrorDocument 404 /phpinfo.php > > /phpinfo.php exists, it just does phpinfo(); > > If I call http://localhost/dontexist?plop=foobar I will see the > phpinfo, > and I will see variables like : > > REDIRECT_ERROR_NOTES: File does not exist: /var/www/dontexist > REDIRECT_QUERY_STRING: plop=foobar > REDIRECT_REQUEST_METHOD: GET > REDIRECT_STATUS: 404 > etc > > but $plop won't be set, and there is no way to get the variables > back. In POST method I won't even see the REDIRECT_QUERY_STRING at > all. So should this work, if not why, and is there a way to fix it ? I seem to remember some discussion about this ages ago - there was some difference between how ErrorDocument works in httpd.conf and .htaccess - you might try the latter and see if there is a different result. Then again, I might not be remembering correctly, so ... Cheers -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#108238) next »