Page 1 of 1

header() in ie and mozilla

Posted: Sun Apr 13, 2003 11:18 am
by Guy
I'm using

Code: Select all

<?php
header("Location: ../default.php"); 
?>
in login.php page which is in an include directory above the root directory,
to redirect after a login check.
the default page(which calls login.php) is in the root directory, and the login check page is
in a directory above.
in IE6 it works ok, but in MOZILLA it send me back to the parent of the root directory.
any ideas?
Thanks
Guy

Posted: Sun Apr 13, 2003 2:41 pm
by volka
../default.php applies to the current url of the document as seen from the browser, regardless of the position of the script that created the header.
Having an url http://the.test.ed/script.php ../default.php is quite silly. IE accepting it (in some way) is not a fault of mozilla ;)