From: waazup at hotmail dot com Operating system: Windows XP Pro PHP version: 4CVS-2003-05-30 (stable) PHP Bug Type: IIS related Bug description: using header location with "/" as directory doesn't work properly
First thing is I tried this on Apache/Linux and had no problems. I installed the CVS Windows version on my Windows XP Pro box. Today's date is May 30th, 2003. I create a virtual directory named "phpbugheader" inside I've put an index.php page which just says hello world. Then I create a subdirectory called "test" and put a script in it called test.php The location of the file on my box is: http://192.168.0.3/phpbugheader/test/test.php The contents of the file are as follows: <? // this works //header("Location: http://192.168.0.3/phpbugheader/index.php"); // this doesn't work header("Location: /phpbugheader/index.php"); die; ?> As you will notice. If I try to redirect to the index page using the top header call everything works fine. If I try using the bottom header call what happens is it redirects to the page (eg the browser displays the hello world message) the problem is that the location still shows: http://192.168.0.3/phpbugheader/test/test.php This only seems to happen when the location starts with / it's seems to work fine when using ../ This causes huge problems on site with relative images because the browser seems to think it's in the test directory when it should be in the base directory. I can reproduce this bug surfing with IE6 and Mozilla1.4b and from Mozilla1.4b on a linux client. This leads me to conclude the bug is isolated to Windows and IIS. -- Edit bug report at http://bugs.php.net/?id=23911&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23911&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23911&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23911&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23911&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23911&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23911&r=support Expected behavior: http://bugs.php.net/fix.php?id=23911&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23911&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23911&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23911&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23911&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23911&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23911&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23911&r=gnused
