I want to remove my .php ext and i have the script that works in my ht access. I think...

But I think since I built my navbar in php its wont find the page when I remove the .php from the a href tags.

if someone could help I would appreciate it.

I have a var set on the top of each page so the php navbar knows which page is active.

this is my nav bar
<?php if ($page == 'home') { ?><li class="active"><a href="index.php" class="active">Home</a></li>
<?php } else { ?><li><a href="index.php">Home</a><?php } ?>

<?php if ($page == 'services') { ?><li class="active"><a href="services.php" class="active">Services</a></li>
<?php } else { ?><li><a href="services.php">Services</a><?php } ?>

<?php if ($page == 'projects') { ?><li class="active"><a href="projects.php" class="active">Projects</a></li>
<?php } else { ?><li><a href="projects.php">Projects</a><?php } ?>

<?php if ($page == 'contacts') { ?><li class="active"><a href="contacts.php" class="active">Contact</a></li>
<?php } else { ?><li><a href="contacts.php">Contact</a><?php } ?>

this is my .htaccess file

  #RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [QSA,L]