Fixing 404 for wiki pages


In r44919 I’ve gone ahead and reimplemented bug 2585, so a page view for a nonexistent page will return a “404 Not Found” HTTP status code instead of a “200 OK”.

This will allow bots and spiders to detect broken links from the outside web to bad or deleted wiki pages, but should be totally transparent to end-users.

When we first attempted this in 2005, the 404 was also applied to action=edit pages… We had a large number of reports from active editors that they were having trouble creating articles, with the edit page not loading properly.

Since this was disrupting basic site activity, we ended up reverting it before we had a chance to really track it down — none of the developers could reproduce it at the time.

The size of our base HTML from even the simplest skin should be enough to avoid tripping Internet Explorer’s “friendly error pages”, and we were unable to track down any specific browser, ISP proxy, or other hypothetical problem source.

If people do encounter problems once this goes live, it at least shouldn’t affect primary wiki functionality while we reproduce and fix it — hitting a raw page view for a nonexistent page is something that you usually have to jump through some hoops to do within the wiki.

After things have settled a bit, we’ll probably start using more 4xx and 5xx status codes for various error pages.

Leave a Reply

Your email address will not be published. Required fields are marked *