Rewrites main page.