Re: causing HTTP error status

From: Date: Fri, 05 May 2006 08:41:17 +0000
Subject: Re: causing HTTP error status
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-235623@lists.php.net to get a copy of this message
"Richard Lynch" <ceo@l-i-e.com> writes: > On Thu, May 4, 2006 8:50 am, Nic wrote: >> I'm having trouble with setting HTTP error status from PHP4. >> >> The PHP docs say that if I have this : >> >> <Directory /mydir> > > WILD GUESS!!! > > Try it with full pathname to /mydir, or perhaps without the leading > '/' or some combination of more/fewer directories and/or slashes. No. /mydir is the directory I want the error page served for. It does actually work outside the PHP environment, eg: <Directory /mydir> ErrorDocument 404 "hello!!!" </Directory> and requesting /mydir/not_there returns a 404 with "hello!!!" in the page. But /mydir/some.php doing: header("HTTP/1.1 404 Rubbish!!!") _never_ causes the error document to be picked up. It's strange because the docs say this can be done; I can't find an example that is purported to work outside of the docs though. Nic

« previous php.general (#235623) next »