Re: RE: how to generate static html pages from dynamic php pages

From: Date: Thu, 09 May 2002 17:30:53 +0000
Subject: Re: RE: how to generate static html pages from dynamic php pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96842@lists.php.net to get a copy of this message
Rasmus, I see what you're saying. You're right, I do have some PHP overhead that you don't. I guess I feel that, even for very high-traffic sites, PHP should be able to deal with it, as long as the coder (me) doesn't do anything too stupid. I only have one minor point -- I realize that this borders on nitpicking, but I'm stubborn, and I wanted to point it out anyway. You said: <snip> > ErrorDocument 404 /script.php > > Therefore, instead of Apache sending a 404 to the client, it runs > script.php. </snip> Apache still does send a 404 to the client, even if you have a custom ErrorDocument defined. You can verify this by telnetting directly to a server that has a PHP error document defined, requesting a bad URL, and examining the headers you get back. However, as you also pointed out, if you make your 'script.php' output this: header("HTTP/1.1 200 OK"); then that seems to be sent instead of the 404 status code. This can also be verified by examing raw HTTP headers you receive. I just wanted to point out that Apache still sends a 404; it's up to the ErrorDocument to override that status code if you want it to be something different. Thanks for the enlightenment! -- [ joel boonstra | jboonstra@gospelcom.net ]

« previous php.general (#96842) next »