title: Creating a PHP 'controller' file to build all pages on site
body: <p>I was working on another project using the CodeIgniter framework, which had a main controller file that built all of the pages on the site. </p>
  
  <p>Entering a url such as 'domain.com/about' would run 'function about(){' in the controller file, which loaded in the various components of that page.</p>
  
  <p>Most of the magic of this was handled by either CodeIgniter, or the other project members, so I am unsure exactly how that happens.</p>
  
  <p>I am looking to achieve the same thing, without the use of any frameworks, and am at a complete loss of how to accomplish it. I know that it would be possible for me to have a url somewhere along the lines of 'domain.com?load=about', and use this to run that function, but I want the URL to be clean, and easy for visitors to type in.</p>
  
  <p>So, my question is.. How can I set up my website so that it always points to a single file, 'controller.php', and then run's a function which matches what is input in the URL, AND have that URL not direct me away from the controller page? (That is to say, if I type in 'domain.com/about' I don't want to get taken to an about.php page!)</p>
  
  <p>I apologize in advance if this question is hard to understand, or if I am taking the wrong approach to anything. Also for the lack of examples and descriptions.. I just really don't know enough to be any more specific. If there is anything you need to see, or know, just ask and I will do my best to clarify!</p>
  
  <p>Thanks!</p>