[PHP] 404 Header Problems

2005-07-13 Thread Scott Taylor


I'm trying to issue a 404 header on one of my pages.  But it does not 
redirect.  I figured, with many function calls before it, that it might 
be outputting something to the screen before the header() command was 
issued.  So, I tried issuing a 404 header from a new page, consisting of 
this code:




or


But neither of these work.  Notice how there should also be no ouput to 
the screen before the header is closed.


I've also tried:



which gives the same results.  The results are this: an output of 
.  I'm on a large shared server, and my guess 
is that when there is a bug with some code in php, the server chooses to 
ouput this instead of the actual error code(s).  I've experienced this 
many times when I upload a page and there is a simple syntax error such 
as one semi-colon missing from a statment.  This is probably so that the 
server doesn't get hacked.



If I try to issue both commands, in either order, I get this:


Not Found

The requested URL /cgi-sys/php.cgi/testing_server/404_error.php was not 
found on this server.


Additionally, a 500 Internal Server Error error was encountered while 
trying to use an ErrorDocument to handle the request.


Sowhat's going on here?  Am I to conclude that the 404 header does 
not work, and that I should just use a Redirect: header() to my 404 page?


Best Regards,

Scott Taylor

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 404 header

2001-08-21 Thread Boaz Yahav

Hi

I'm using IIS and I changed the 404 page to something else. Now the
server returns an 200 OK message for a mistaken page :)
Does anyone know the exact headers I need to send b4 the page so that
the server will send back to the client the 404 NOT FOUND header along
with the new page?

thanks

berber

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]