Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
634 views
in Q2A Core by
Hello. When I open unexisted page, I get 4040 error, but server gets 200 status. Is it possible to return 404 when I open unexisted page?

2 Answers

0 votes
by
 
Best answer
This should be fixed in version 1.2 - are you using that?
+1 vote
by
If you are not using the latest version then you can add this yourself. In 'qa-page-question.php' around line 220, you will see:

  if ((!isset($question)) || !$question['viewable']) {

Right after that line, put this:

  header('HTTP/1.1 404 Not Found');
by
Quite right. Even in the latest version it doesn't output a HTTP 404 header if a non-existent question number is requested (as opposed to other non-existent pages) so I'll fix this for the 1.2.1 release.
...