One quick glance of an experienced eye allowed to understand the blurred
and almost unreadable Micha³ Wo¼niak's handwriting:
[color=blue]
> One quick glance of an experienced eye allowed to understand the
> blurred and almost unreadable
humbads@gmail.com's handwriting:
>[color=green][color=darkred]
>>> if($pageNotPublished) {
>>> header("HTTP/1.1 404 Not Found");
>>> // How do I send the default apache 404 message
>>> // instead of the message below?
>>> print("<html><body>HTTP 404 - Not Found</body></html>");[/color]
>>[color=darkred]
>>> Hmm..What about readfile() here?[/color]
>>
>> Thanks for your reply. readfile won't work because the 404 message
>> contains dynamic information like the requested URL. It looks like
>> this:
>>
>> Not Found
>> The requested URL /alkdf was not found on this server.
>> Apache/1.3.33 Server at mywebsite.com Port 80
>>
>> Of course, I could recreate it using PHP functions, but for
>> consistency, I'd rather have PHP pass through to Apache's default 404
>> error handler. I think this is a tough question, any experts want to
>> take it? In the meantime, I'll cross post my question in the Apache
>> ng.[/color]
>
> What about $err404=readfile('some/non-existant.file');
> str_replace('some/non-existant.file', 'your_file', $err404);?
> :)
>
> Cheers
> Mike[/color]
Ooops, sorry, readfile reads the file into the buffer... My mistake.
Cheers
Mike