Question: I'm currently in the process of setting my website, largely with php. Though this is my first time using it so I'm running into some problems.

I've got the basics of the site down. Registering, login-in, profile page e.t.c. However this is where I seem to have to make a decision about the site layout.

For instance. Currently a user's profile page has the URL of 

> 
> mysite.com/profile.php
> 
> 
> 

Ideally what I would like is for it to be is something along the lines of 

> 
> mysite.com/user/ChrisSalij
> 
> 
> 

From reading [this](https://stackoverflow.com/questions/115629/simplest-php-routing-framework) among other things I believe I need a Front Controller style site, though I'm not sure of this, nor where to start with implementing one.

Bearing in mind that I'm pretty new to php and the like, I would appreciate any helpful comments, and links, and constructive critiques. 

I'm defiantly will to learn so links to articles and explanations would be excellent. I usually do a fair amount of research on stuff like this. But I'm so new to it that I don't know where to start.

EDIT: I should also add that I'm planning on scaling this website up to the large scale. It's small to start with but there should be quite a few pages if my goals work out. So I'm willing to put the effort in now to get it set up right for the long term.
Thanks

Answer: 
Creating a "Front Controller style site" would mean 

1. Using mod\_rewrite to intercept all requests into your website/application
2. Mapping that URL to a PHP class name (your controller) and a method on that controller (typically called action.

However, **you** don't want to be using PHP directly for this, you want to use either a PHP/MVC Framework, or a PHP based CMS. Example include [Joomla](http://www.joomla.org), [Concrete5](http://concrete5.org/), [Code Igniter](http://codeigniter.com) and [PHP Cake](http://cakephp.org). This is a "solved" problem.

All of these frameworks have already done the hard work of (among other things) deciding when/how a URL is transformed into a PHP class. By picking one you can ignore re-implementing the wheel and concentrate on your core business (the site you're building).

That's not to say there isn't room for a new framework, either built from scratch or one that combines modules from some other framework (such as the excellent [Zend Framework](http://framework.zend.com)). However, the fact that you're asking such a basic question means you're probably not experienced enough to be the person who should build that (don't feel bad, no one magically has that kind of experience, it only comes with time)

Get some experience under your belt with the existing frameworks, see how they're built and get a feel for how you use them. Then "later", once you have a bunch of real world experience under your belt, if you still feel the need to build your own framework you'll be in a better position to tackle the problem.
I agree with Sev, this can also be handled with url rewriting. You should also look into frameworks like CakePHP and CodeIgniter that do some things like this for you automatically.