HCSVLAB-525: Fix problem with 404 errors for non html or json requests. Make html requests redirect with an error message rather than returning 404