commit 89b827214e68c971373e4ceca0eeb36663ab6b02 from: Alisdair MacLeod via: Alisdair MacLeod <131350026+admacleod@users.noreply.github.com> date: Tue Mar 31 08:04:09 2026 UTC Redirect unknown routes to home page instead of returning 404 Users with old bookmarks or shortcuts were getting a plain-text 404 error after d3b734c. Use a 302 temporary redirect to / so they land on the bookings page instead, without permanently caching the redirect. Co-Authored-By: Claude Opus 4.6 (1M context) commit - 13e4d4f78b59136f0e590fbb4cb79a4c94551576 commit + 89b827214e68c971373e4ceca0eeb36663ab6b02 blob - e889ef2141cd9def0b1f3aa302ba15309f7a89da blob + 8d11358f2c226c6c3c9d113a67c5801b779320fc --- deskd.c +++ deskd.c @@ -183,7 +183,7 @@ main(const int argc, char *argv[]) else cgi_error(405); } else { - cgi_error(404); + cgi_redirect(302, "/"); } free(path_copy); blob - 81d3348e15abf9db35adb39908f9e9d5aa1f505d blob + 6154e72ca9472527d7cb8850f6ff627bdd32443d --- test/route-unknown.test +++ test/route-unknown.test @@ -1,4 +1,4 @@ -Unknown route returns 404. +Unknown route redirects to home page. --- --- --- @@ -8,7 +8,8 @@ SERVER_PROTOCOL=HTTP/1.1 --- --- --- -Status: 404 Not Found -Content-Type: text/plain; charset=utf-8 +Status: 302 Found +Content-Type: text/html; charset=utf-8 +Location: / -Not Found +Found.