automatic redirection from root to api.php