Standardized 404 redirects

Fixed a bug that was causing some 404 redirects to direct back to the previous page instead of to the 404 error page.

If any implementations were relying on users being redirected back to the previous page, they might need to be updated to account for the new redirect to the 404 page.