I cant get header location to work on my server, but when i run the script at localhost, everything works fine. It seems the server does not run this line.
header('location:index.php');
Server running linux stack with php 7.2, localhost is running xampp (osx) with php 7.3.
I have several projects on the same server with header location, and those are working fine.