Assuming you're on apache, you can create a file called .htaccess at the root of your site, and add these lines
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /index.php?url=$0 [L,QSA]
This will pass all page requests to index.php. In index.php, you'd want to to parse $_GET['url']
and load up the proper page with include
. You'll have to sanitize the input and make sure people aren't including anything they shouldn't. You can get the pieces with something like:
list($controller, $username) = explode('/', $_GET['url']);
The typical MVC structure would use controller/action/id
. If "action" is omitted though, as in your example, I'd make it default to "view". As in "view" user's profile. The ID would be the username. Typically, each controller is a class, and each action is a function in that class, any parameters after that are passed into the function. There's also an associated view file with each action.
It's a lot of code to give you a full example (I just coded up an MVC framework!) but that should give you the basics to get started.
Definately check out some other frameworks like CakePHP, Kohana/CodeIgniter if you need more details and code examples.