[Pushed] Return correct HTTP status codes
#1
The default MyBB forum/thread/user not found/does not exist pages return HTTP status code 200 (success) currently. I think that PHP's http_response_code function should be used and make those pages return the correct HTTP 404 status code.

Could this be extended to make the 'no permissions' error page return a status code of 403 (forbidden) or 401 (unauthorised)?
Reply
#2
I think the Google SEO plugin does proper 404s however this would be a nice enhancement to MyBB.
Software Engineer specializing in C# Program Development
Reply
#3
I would definitely like to see this in the core too.
Reply
#4
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2864

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply
#5
This user has been denied support. This user has been denied support.
Google SEO does it - not just 404 but any code you like, it's customizable for each error label. Basically you can assign an error code to each $lang[error_*] if you like, so it also works for plugin errors as long as they're raised the same way and the error message is present in $lang.

Some hosts do not pass through custom error pages (and I don't know how proxies like cloudflare interpret them) so it should be a setting.
Reply
#6
(2017-10-06, 03:43 PM)frostschutz Wrote: Google SEO does it - not just 404 but any code you like, it's customizable for each error label. Basically you can assign an error code to each $lang[error_*] if you like, so it also works for plugin errors as long as they're raised the same way and the error message is present in $lang.

Some hosts do not pass through custom error pages (and I don't know how proxies like cloudflare interpret them) so it should be a setting.

Yep, it's one of the reasons I use Google SEO Smile

Worthwhile trying to fix it in the core, though I don't know if we'll end up going to the lengths of allowing custom codes per error string, though there will definitely be a setting (enabled by default) to disable it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)