title: accessing $_GET[] array with url rewriting
body: <p>I'm building a website for a hair saloon. I got all the time that i need so I i started to build my MVC framework just to better understand MVC. The core of MVC is url rewriting.</p>
  
  <pre><code>RewriteRule ^(.*)/?$ index.php?url=$1 [L]
  </code></pre>
  
  <p>That would result in this...</p>
  
  <pre><code>www.example.com/register
  $_GET['url'] = 'register'
  </code></pre>
  
  <p>I decided to make the page post/redirect/get pattern. So when I redirect, the url should be something like this...</p>
  
  <pre><code>www.example.com/register/John/Doe/mail
  </code></pre>
  
  <p>or something similar. That value is entirely in the $_GET['url'] variable. Is there a way to make the url look like this...</p>
  
  <pre><code>www.example.com/register/?name=John&amp;lastName=Doe&amp;mail=johdoe@gmail.com
  </code></pre>
  
  <p>which would be accessabile with $_GET['name'], $_GET['lastName'] etc...?</p>
  
  <p>I know that there is an entire uri in the $_SERVER['REQUEST_URI'] variable, but i was wondering is there a cleaner way to get the values?</p>