IIS 5 & IIS 6
IIS PHP Header(Location:) problem
Last post Nov 07, 2008 01:30 PM by free77777
Nov 07, 2008 01:30 PM|free77777|LINK
I hope someone can help me with this because google and reading tons of forum posts failed me... I have a weird problem with the Header() php function on my IIS server:
In a specific situation, when the redirection points to the same url as the original (example: you enter www.example.com/index.php and get redirected to www.example.com/index.php), IE shows a 'this could be a DNS error' or let's call it a blank page, because
there is no http error code, it's just like the server wouldn't exist for a sec. Unmarking "Show friendly error codes" doesn't give anything more. After hitting refresh the site works again, just the Header() redirections to the same url fails. The problem
is that this is occuring in a bought online shop app so commenting out those problematic Header() isn't quite the solution, and it is also used in many forms here (sometimes I dunno what for but nvm ;)
This app worked fine on the previous server (not IIS).
So, short summary:
url -> http://www.example.com/index.php -> Header(Location: http://www.example.com/index.php) -> blank page
url -> http://www.example.com/index.php -> Header(Location: http://www.example.com/something.php) -> works
url -> http://www.example.com/index.php -> Header(Location: http://example.com.index.php) -> even this works but won't work for the second time
I all ready tried changing the php.ini according to this http://forums.iis.net/p/1074636/1575633.aspx but there's no influance on the behavior.
Please help, and sorry for bad English :(