title: How to do URL re-writing in PHP?
body: <p>I am trying to implement URL rewriting in my PHP application. Can someone share a step by step procedure of implementing URL rewriting in PHP and MySQL?</p>
  
  <p>In my application I want to implement following URL rewriting, I want to redirect</p>
  
  <pre><code>1. http://example.com/videos/play/google-io-2009-wave-intro
  2. http://example.com/videos/play/203/google-io-2009-wave-intro
  </code></pre>
  
  <p>to</p>
  
  <pre><code>1. http://example.com/videos/play.php?title=google-io-2009-wave-intro
  2. http://example.com/videos/play.php?id=203
  </code></pre>
  
  <p>Please tell me how to implement both URL rewriting in any of the above way. </p>
  
  <p>One more thing which URL will be best according to SEO, management, application point-of-view out of the following two types.</p>
  
  <pre><code>1. http://example.com/videos/play/google-io-2009-wave-intro
  2. http://example.com/videos/play/203/google-io-2009-wave-intro
  </code></pre>