How do I make pages in individual directories?

multimediocrity

I have been curious for a long time about how to make web pages with a page in each directory.

Example:
mysite.com
mysite.com/tools
mysite.com/about

Usually, I just create one php page and leave it as index.php and use variables to call all other pages.

Example:
mysite.com/?p=tools
mysite.com/?p=about

This works fine, but I'd rather not develop sites this way. I can easily add my page code to each page in the directory, but I want to use one central document for governing all my PHP. What is the most professional way to handle this? I can think of many solutions, but what is the paradigm?

multimediocrity

Hmm... is this the going paradigm? I think there's a more conventional and simple way to do this, but I'm not sure what it is.

Jeff_Mott

That's the going paradigm. The major frameworks do it this way. For example, Zend, Symfony, CakePHP, CodeIgniter, and others -- they each have you define a mapping between an external URL and an internal action to perform.