Use requirejs to rewrite index page.