title: redirecting user varying location path
body: <p>If I have a file located at <code>"Project/index.php"</code> which is where I want my user to get redirected no matter where they are in the file structure.</p>
  
  <p>I have two files with different file paths:</p>
  
  <pre><code>"Project/file1.php"
  
  "Project/sub/file2.php"
  </code></pre>
  
  <p>On both files the user can click on logout which takes them to the logout page.
  The logout page is located here: <code>"Project/sub/logout.php"</code> 
  which contains the code:</p>
  
  <pre><code>header('Location: ../index.php');
  die();
  </code></pre>
  
  <p>If the user was on file2 then this script would work however if the user was on file1 then the script wouldnt work. </p>
  
  <p>Is there a way to allow the user to logout no matter where they are in a file structure without having to create multiple logout pages?</p>