rewrite index page