Creating centralised index.php

Hello

I am creating a website with 10 pages.

I want to create a centralised index.php. For example

www.xyz.com/project goes to index.php
www.xyz.com/aboutus goes index.php

Then index.php fetches that main.tpl and project.tpl and merge them.

Don’t worry about .htaccess or rewriterule. Don’t worry also about the templates engine. I can do this.

I just want to know how to code and structure index.php

Thank you

index.php = template engine.

This might help you out:
Symfony - Symfony2 versus Flat PHP
Scroll down to the section called: A “Front Controller” to the Rescue