title: PHP URL Rewrite - No getting Query String Parameter
body: <p>I am working on a site and learning PHP at the same time so it is relatively new to me. I am working on URL rewrite currently, however, I am not getting the desired result.</p>
  
  <p>I am trying to change: <code>example.com/CMS/listing?id=1</code> into <code>example.com/CMS/listing/1</code>.</p>
  
  <p>Using the <code>.htaccess</code> file held in the root of the files, I have the following:</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteRule CMS/listing/([0-9]+) CMS/listing.php?id=$1
  </code></pre>
  
  <p>And on the site, I have a simple echo function which gets the query string param for <code>id</code>. When I navigate to <code>example.com/CMS/listing?id=1</code> the function displays <code>1</code>, however, when I go to <code>example.com/CMS/listing/1</code> it does not show anything. Is there something I'm missing or doing wrong?</p>
  
  <pre><code># Get QString Param
  $id = $_GET["id"];
  echo $id;
  </code></pre>
  
  <p><em>Footnote</em></p>
  
  <p><code>.htaccess</code> is held at the root, and <code>listing.php</code> is within a folder called <code>CMS</code>.</p>