title: Mod rewrite - PHP
body: <p>I use urls like </p>
  
  <blockquote>
    <p>www.example.com/viewpost.php?TITLE=mp3playerforsale&amp;ID=123</p>
  </blockquote>
  
  <p>Where i am passing ID parameter and Title and then display records from sql in PHP. </p>
  
  <p>Later I can able to use MOD REWRITE functionality in .htaccess and able to convert as dynamic seo friendly url like</p>
  
  <blockquote>
    <p>www.example.com/mp3playerforsale-123<br>
    www.example.com/carforsale-124</p>
  </blockquote>
  
  <p>Where 123 gets corresponding records stored in sql database, e.g.</p>
  
  <pre><code>ID    Title
  123   mp3playerforsale
  124   carforsale
  </code></pre>
  
  <p>Now I have the requirement that I have two pages which have ID and title as parameters. But both has to displayed in two different pages.</p>
  
  <p>Example:</p>
  
  <blockquote>
    <p>mp3players should go to page viewpost.php?ID=123<br>
    cars should go to page viewpost2.php?ID=123</p>
  </blockquote>
  
  <p>When i tried both displayed in viewpost.php where I need to display cars category in different pages.</p>
  
  <p>I am already using this </p>
  
  <pre><code>RewriteEngine On
  RewriteRule ([-A-Za-z0-9]+)-([0-9]+)/? viewpost.php?TITLE=$1&amp;ID=$2 [NC]
  </code></pre>
  
  <p>Any help appreciated !</p>