Re: Overiding HTTP/1.1 or Status headers
| From: | Rasmus Lerdorf | Date: | Thu, 28 Sep 2000 09:05:42 +0000 |
| Subject: | Re: Overiding HTTP/1.1 or Status headers | ||
| References: | 1 | Groups: | php.general php.windows |
| Request: | Send a blank email to php-general+get-17879@lists.php.net to get a copy of this message | ||
Header("http/1.0 200 OK") should work fine.
On Thu, 28 Sep 2000, Nold, Mark wrote:
> ----------------------------------------------------------------------------
> -----------------
> Disclaimer: The information contained in this email is intended only for the
> use of the person(s) to whom it is addressed and may be confidential or
> contain legally privileged information. If you are not the intended
> recipient you are hereby notified that any perusal, use, distribution,
> copying or disclosure is strictly prohibited. If you have received this
> email in error please immediately advise us by return email at
> postmaster@normandy.com.au and delete the email document without making a
> copy.
> ----------------------------------------------------------------------------
> -----------------
> Hi guys,
>
> I would like to be able to do either
> Header("STATUS 200 OK");
> or
> Header("HTTP/1.1 200 OK");
>
> In my error.php files so that the browser is sent a statement say they have
> in fact found the right file.
>
> On Apache in Windows with php4.0.2 i get Server Internal Errors (ie: 500)
> whenever i try to do this.
>
> Why would i want to do this?
>
> I want to have a directory called /path/to/direct/ and any time anyone looks
> for a file in there my error.php looks up a DB and sends the the correct
> document with a readfile() and the correct headers.
>
> This currently works for most doc types except .pdf's and a few others.
>
> The only difference i can see in the headers being accepted by Acrobat is
> that im currently sending a 404 ... so id love to be able to send a 200 if
> the document is actually there.
>
> Any ideas?
>
> PS: I cant use mod_rewrite or anything Apache specific as it must run on IIS
> and Apache...
>
>
> Mark Nold
> markn@alverstone.com.au
> Systems Consultant
>
> Change is inevitable, except from vending machines.
>
>
>
>