title: How to add additional URL variables to a URL already rewritten with mod_rewrite
body: <p>Does anyone have any idea if it is possible to put additional variables into a URL that you are using mod_rewrite to basically chop up into variables.</p>
  
  <p>For example, if I have the URL:</p>
  
  <pre><code>website.com/post/53/post-title/
  </code></pre>
  
  <p>and I am using mod_rewrite to turn it into:</p>
  
  <pre><code>website.com/post.php?postid=53
  </code></pre>
  
  <p>Is there and elegant way to put additional variables into the "pre-rewritten" URL and keep them for my <code>post.php</code> script?</p>
  
  <p>I.E., what if I create a link like the following:</p>
  
  <pre><code>website.com/post/53/post-title/?anothervar=6
  </code></pre>
  
  <p>So far it seems like my mod_rewrite code is just throwing out the additional variable and sending the URL to the <code>post.php</code> script like this:</p>
  
  <pre><code>website.com/post.php?postid=53
  </code></pre>
  
  <p>I do know that I can use <code>$_SERVER['REQUEST_URI']</code> to get the original URL in my php script (AKA <code>website.com/post/53/post-title/?anothervar=6</code>) before it gets rewritten by mod_rewrite and then just chop up the string to get that added on variable, but I just wanted to know if there was a more elegant solution that solely used mod_rewrite.</p>