On Tue, Jan 28, 2003 at 01:27:15AM -0500, Steven J. Sobol wrote:

> > Can't be done without an internal redirect.
> 
> Alright... :>

Well, OK, to be complete: I guess you could do something like 
   readfile("http://stevensobol.com/this/shall/trigger/an/404.html";);
but that would be cheating. And inefficient. And it will most likely
report the wrong URL back to the user.

> > This is incorrect. You want either
> >     header("HTTP/1.0 404 Not Found");
> > or
> >     header("Status: 404 Not Found");
> 
> According to some debugging I did, the latter doesn't seem to work with 
> PHP 4.3.0, you get HTTP/1.0 200 OK and down below that the Status header. 
> The first method does work.

I did seem to recall that the latter form was a php3-ism.

> Well, I thought about it. I think my original code from code-init had 
> comments to just send the 404 and let the <(display)> element do the rest;
> that is a style element that I use that checks the information returned by 
> the code I posted earlier, and pulls content from the appropriate place.

That's more or less what I do.

> I guess my big concern is search engines. If someone hits my page at
> http://some.url/active_page/nonexistent-content which doesn't map to
> anything and I send back a 404, they won't generate an entry for that
> page, right?

A 404 is an inequivocal answer of "this does not exist. Now go away already,
or I shall hunt down and kill you pet moose".

It's tested easily enough with wget.

Emile

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to