Handler for prettier http 404 and 500 errors page