On Mon, Sep 26, 2005 at 08:09:47AM CDT, Joshua Slive <[EMAIL PROTECTED]> wrote:
: On 9/26/05, Frank Arensmeier <[EMAIL PROTECTED]> wrote:
: >
: > I am new to Apache and I ran into a problem which I haven't found a
: > solution for yet. My server is Apache 1.3.33 on Mac OS X (the bundled
: > version). I am looking for a way to configure a .htaccess file the
: > following way:
: >
: > 1) in a certain path of my webserver, all 404 errors should be grabbed
: > and forwarded to a PHP script
: > 2) I don't want Apache to send any headers before the PHP script
:
: I'm not sure if there is a way to do that with PHP. With a CGI
: script, you simply give it a name starting in nph- (for "non-parsed
: header") and then it gets to do all the headers itself (with a couple
: exceptions).
:
: But what you really want is simply to set the status of the response.
: In that case, you can probably use something like
: header('Status: 200 OK')
: to set a non-error status.
I think there's a way to do either.
To redirect while sending the 404 status code to the client:
ErrorDocument 404 /path/to/script.php
To redirect while NOT sending the 404 status code to the client:
ErrorDocument 404 http://www.yourserver.com/path/to/script.php
--
Eugene
eugene at fsck dot net
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]