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
--
TWikiGuest - 27 Sep 2007
Answer
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