Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Send a Standard looking 404 error to unwanted vistorsby Dog and Pony (Priest) |
on Oct 01, 2002 at 22:33 UTC ( [id://202135]=note: print w/replies, xml ) | Need Help?? |
First off, I seem to recall that status should be '404 Not found', not only the number.
Secondly, for a message to display, you will have to actually print something. Such as
What you mean with 'for the particular browser you are using' I am not sure - is it that IE replaces errors with its own "friendly" pages? You should be happy if it does not for you, that is a really annoying "feature" that sometimes hides important information to the user. If you really want it to display the built-in message, I'm not sure why it doesn't trigger. Maybe because some header is missing, may be because it recognizes that it is a script, or at least not a plain HTML doc (on the files extension). You could, of course, redirect (IE) users to some bogus URL like so: I *hate* browser checks, but if you must, you must. What I really think you should do is have a fun 404 page instead, like SGI's (I think) that showed a random very sad and crying baby when a page could not be found. Of course with the proper status code. Or maybe one of my personal favourites, http://icculus.org/404 (got it from someone here, was it Aristotle? Whoever it was, thanks again! :) ). And oh, try reloading it for new messages. You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue.
In Section
Seekers of Perl Wisdom
|
|