As your pages are all on the root of the website, why not prepend a slash and make them absolute paths in html:
<td><a href="[COLOR="Red"]/index.php[/COLOR]" style="text-decoration: none">Home</a></td>
<td><a href="[COLOR="red"]/about.php[/COLOR]" style="text-decoration: none"><span class="style2">About</span></a></td>
<td><a href="[COLOR="red"]/portfolio.php[/COLOR]" style="text-decoration: none"><span class="style2">Portfolio</span></a></td>
<td><a href="[COLOR="red"]/contact.php[/COLOR]" style="text-decoration: none"><span class="style2">Contact</span></a></td></span>