Are you wanting to create links or redirect to those pages? I assume redirect, so try putting this at the VERY top of index.php
if ($_GET["p"])
{
Header("Location: $_GET[p].php");
}
That should work for redirect. It's important that you place this at the top of the index page, before any other headers are sent to the browser (such as include() or session_start() or even basic HTML tags).
Hope this helps.