It looks like .htaccess file redirects everything to the home page.
There are two options...
1. Once you log into your site's FTP, please find the file named .htaccess. It is usually hidden by default. Depending on which FTP software you use, you may find the instructions in its help pages to see hidden files. Once you enabled this option, you may see .htaccess file. Check, if there is any code in there. If there is some code, backup this code and empty this file. Now, you would probably see test.php and other WordPress stuff.
2. If you don't have any other domains with this account, please contact your web host, explain the situation and ask them to wipe out everything on your site to start from scratch. As you mentioned, WordPress worked initially for you. Only after changing something in the header.php, everything went wrong.