-
Bug
-
Resolution: Fixed
-
Major
-
3.0.x
-
None
-
PHP Environment:
Database:
Currently phpBB shows a "Topic doesn't exist" message when the user tries to open an invalid URL, the URL of a deleted topic or the URL of a topic that's inaccessible to this user. The same goes for forums.
For bots it would be good if a 404 is returned in these cases because:
- This makes it easier to erase unwanted information from search engine caches/indices
- Some bots don't like the fact that random URLs return a 200 statuscode
- The bot won't need to update the URL (as often) as it would when a 200 is returned
- It's not very useful to index a "Topic doesn't exist" page
I've fixed this by adding this around the topic of msg_handler():
if ($msg_text == 'NO_TOPIC' || $msg_text == 'NO_FORUM')
|
{
|
header("HTTP/1.0 404 Not Found");
|
}
|
IMO this is not the cleanest way to fixed this but this saved me quite a bit of work Those two messages are returned in quite a few places...
- caused
-
PHPBB-9793 Undefined function send_status_line() in download/file.php when in avatar mode.
- Closed
-
PHPBB-10029 No such thing as $_SERVER['HTTP_VERSION']
- Closed
- is duplicated by
-
PHPBB-8025 incorect header when a topic dont exist
- Closed
- is related to
-
PHPBB-9609 Use send_status_line instead of calling header
- Unverified Fix