First try using URI not URL, it should work!
header("Location: index.php");
Try using localhost like this :
header("Location: http://127.0.0.1/Doubler/index.php");
OR
header("Location: http://localhost/Doubler/index.php");
And if using Domain then
header("Location: https://whateverdomain.com/index.php");