I had this a few times. Take a look at this in your php.ini
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; You CAN safely turn this off for IIS, in fact, you MUST.
; cgi.force_redirect = 1
Might try uncommenting that. And somewhere along the line try echoing SCRIPT_NAME, if that goes tits up then put
cgi.fix_pathinfo=1
in the ini