split index.html and fix 404 redirect