handling 404s and indexes in engine