Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
92 views
in Q2A Core by

Hi everyone,

I'm trying to change the default 404 Not Found response in Question2Answer to 410 Gone, for some permanently removed pages.

I modified this core file:
qa-include/pages/qa-page-not-found.php

I replaced this line:
header('HTTP/1.0 404 Not Found');

with:
header($_SERVER['SERVER_PROTOCOL'] . ' 410 Gone');

However, when I test the page in the browser, I get a 200 OK response instead 410 Gone.

How can I properly make Q2A respond with a 410 Gone status code instead 404 Not Found?

Q2A version: 1.8.8

Please log in or register to answer this question.

...