Friendly URL's

I’m trying to figure out how to do this by hand. Not using a backend program. I’ve searched but I just don’t know the “name” it would be under.

All of my hand coded sites not using wordpress are basically set up as www.site.com/page1.php site.com/page2.php etc;.

I want to have a site where its set up like site.com/portfolio/bob and site.com/aboutus/contact sort of thing.

I know this can be done with php includes but anytime I do this things just get messy with broken links… not linking to proper directories etc;.

is there a “simpler” way of doing this?