This is my Directory structure:
- admin
- admin_login.php
- include
- header.php
- template
- about_us.php
- contact_us.php
- index.php
and some other folders...
Now in about_us.php
and contact_us.php
I'm including header.php
like this:
require_once('../include/header.php');
Its getting included, no problems there.
But in header.php
, I'm referring to the same files again(Because I'm trying to build a Navigation bar) :
<ul class='tab-links'>
<li class="active"><a href="index.php">Home</a></li>
<li> <a href="template/contact_us.php">Contact</a></li>
<li> <a href="template/about_us.php">About</a></li>
<li> <a href="admin/admin_login.php">Admin Area</a></li>
</ul>
Now, when I click on any of them(except index.php), the URL is like this:
http://proj.loc/Practice/template/about_us.php
But after that, when I click on any other of the Navigation links, it causes the directory node to repeat:
http://proj.loc/Practice/template/template/about_us.php
and then obviously causes the "Not Found" error. Am I missing something here that;s really basic? Kindly enlighten me?