this is not working if this is coded in a file located more than 2 subdirectories..
header('location: admin.php');
i want to go back to the file to the main page...in the root directory..
this is not working if this is coded in a file located more than 2 subdirectories..
header('location: admin.php');
i want to go back to the file to the main page...in the root directory..
header('../location: admin.php'); // 1 folder up
header('../../location: admin.php'); // 2 folders up
thanks...
Shuldn't it be:
header('location: ../admin.php'); // 1 folder up
header('location: ../../admin.php'); // 2 folders up
But HTTP 1.1 requires an absolute URI for the Location field so I am not sure if the above is OK to be used. Anyone knows more about that?
Never had any issues with it yet. Perhaps a server setting doing the translation to absolute?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.