I'd like to ask how to redirect from one PHP to another PHP provided that they are in a different directory. I already found a code that can redirect from one PHP page to another PHP page. However, that is only in the same directly. The code is shown below:
I'd like to know how to redirect to another page in an upper directory.
/* Redirect to a different page in the current directory that was requested */
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'anotherpage.php';