Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: 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

print $WP->h1('404 Page not found');

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:

print $WT->redirect('/showIE404') if($browser eq 'IE');
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 reply to Re: Send a Standard looking 404 error to unwanted vistors by Dog and Pony
in thread Send a Standard looking 404 error to unwanted vistors by krisahoch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found