Very basic code running by itself such as this:
<?php
header( "HTTP/1.1 301 Moved Permanently" );
header("Location: http://www.microsoft.com/");
?>
Is being changed to "302 Moved Temporarily" automatically somehow.
This problem is only happening on windows server 2008 / ii7 / php 5.3 or 5.3.1-dev. I was able to fix the problem with 5.3.1-dev windows development snapshot on Vista & Server 2003, but on windows server 2008, doesn't work.
Note: I was able to fix the problem by not using fastcgi. I had to go back to php 5.2.1 since 5.3 doesn't include php5isapi.dll and it works now. Hope this helps someone.