headers for "image not found" image

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'd like to serve an image-not-found image for images... that aren't
I'm already using a custom 404 handler page.. but this question could
apply to images retrieved from a database or script or whatever...

Anyhow, is the 1st method OK, or should #2 be used?
ie, does the client/bot or whatever recognize the 404 on method 1?
Or, does it think everything is dandy because of the redirect.

header('HTTP/1.0 404 Not Found');
header('location:  '.$image_url);


header('HTTP/1.0 404 Not Found');
header('Content-Type: image/whatever');

is one way more better?

Re: headers for "image not found" image

BKDotCom wrote:

Quoted text here. Click to load it

#2 is much betterer because #1 doesn't make much sense.


Site Timeline