refine index.php rediect policy.