First off, make a new folder, call it what ever you want, this is where your content pages are going to go in while your main page will be up on level (so say on a web server, main directory is usually www or htdocs, then you make a folder called pages.)
Now where you want your content to show up, place the code, but look through and read it so you understand what the code does.
<? //Open up PHP $p = './pages/'; // This is our path to our folder we just created. /* We use an if statement to see if our url has the variable of x in it, this will be our page name. */ if($x = $_GET['x']){ if(file_exists($p.$x.'.php'){ //We then check to see if the file exists using an if statement. include($p.$x.'.php'); //If it does, then we include it into the page, the $p is our path, the $x is our file name, and as you can see, our file extension is .php }else{ //If it doesn't exist include($p.'root.php'); //Include our root page, or news page. } }else{ //If the x variable does have anything in it then include($p.'root.php'); //Include our root page again. } ?>
It's simple as that... And the urls will look like this.
http://www.domain.com/?x=page