rewrite index.php, but not satisfied myself yet