Tags:
create new tag
view all tags

Question

Hello,

how can I make TWiki answer a request for a non-existent page with a HTTP 404 status code in the response? I know that there are templates that determine how a page looks like for a request to ...view/TheWeb/WikiWordWithNoPageAssociated, but I also want to have a proper 404 status code set, as the requested page does not exist.

Regards, Matthias

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- TWikiGuest - 27 Sep 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

This has been discussed in Codev.ViewNonExistingTopicShouldHttp302 where everyone was convinced in the end that it would be a good thing, and that it should be 404, and not 302 like the topic name suggests. It is not yet implemented, though. Today it is still hard coded that the status would be 200, so I'm afraid you need to change the code to achieve what you want.

If you do, we would welcome if you could attach your patch!

-- HaraldJoerg - 28 Sep 2007

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2007-09-28 - HaraldJoerg
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.