Oh, okay. I did make an assumption that I shouldn't have: I thought I knew the value of $ThisPHPFile.
Incidentally, [man]header[/man] can take a third parameter that will save you one call.
I make the first request, and no, it doesn't redirect. I get an ordinary 200 response and a single space character for content.
The second time I make the request I got a 301 redirection and the page loads.
The only difference between my two requests is that for the first one I did not have a session cookie, and for the second one I did.
So: what is different about how you handle a request that doesn't include a session ID and a request that does (where is that space character in the first case coming from)?