Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15854

Event to modify the HTTP status being sent

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • None
    • Other
    • Any

      I'm trying to get my extension to report 410 on a removed topic. I have some spam on the forum (human spam) and when I remove their posts/threads, they have already been sent to search engines via sitemap. Then Google and Bing crawl those 404's for years to come.

      I would like to send 410 in such cases. Google and Bing still come to 410 links but less often. It's also considered a good practice to send a 410 in case a link used to exist but will not come again anymore.

      In includes/functions.php we have a code:

      if ($msg_text == 'ERROR_NO_ATTACHMENT' || $msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER')

      {   send_status_line(404, 'Not Found'); }

      It would be good to have an event around that piece of code, so an extension could choose to send 410 instead.

            Unassigned Unassigned
            Grzegorz.Janoszka Grzegorz.Janoszka [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: