Hi,
Which OS are you running?
If you are navigating to the php page using a browser, it will follow the Location header to the new location, in this case it will navigate to the site root. If you don't have a default document setup, or if the default document cannot be found, it will result in a 404.
HTH,
Kern