Index page js rewrite