handle 404 and clean urls