I would like to understand how navigation works with sites with subdirectories.
For example, if I have this layout,
\index.php
\about_us\about_us.php
The navigation link for index.php to go back to homepage would be,
<a href="./index.php">Home</a>
Whereas the one in about_us.php would be,
<a href="../index.php">Home</a>
At the moment my solution is to simply put all the files in a subdirectory so that I can easily import the menu file into all the pages for easier management. For example,
\index\index.php
\about_us\about_us.php
I can then easily import a menu file,
<?php include 'menu.php'; ?>
...into all my pages since I only need,
<a href="../index.php">Home</a>
It doesn't seem like this is a good solution (everything in a subdirectory) for creating the navigation. Would like some advise on how this is done please. :) Thank you all.