title: SEO Url Redirect/Rewrite Using Database Managed Links
body: <p>I have searched left and right.</p>
  
  <p>And I am trying to find a script or a method on how I can store links in database and use them for redirection.</p>
  
  <p>This is an E-commerce project and I am looking for something to manage product and system URL from database.</p>
  
  <p>Something similar like magento does.</p>
  
  <p>Basically anything after the domain say like <code>domain.com/demo/12/my_iphone</code></p>
  
  <p>so now <code>demo/12/my_iphone</code> will be sent to database for query and in databases there will be a destination URL which could be <code>productlisting.php?searchstring=iphones</code></p>
  
  <p>The user will see link <code>domain.com/demo/12/my_iphone</code> but actually he will be seing <code>productlisting.php?searchstring=iphones</code></p>
  
  <p>Basically <code>demo/12/my_iphone</code> = <code>productlisting.php?searchstring=iphones</code></p>
  
  <p>And tomorrow if the user wants to edit <code>demo/12/my_iphone</code> to <code>demo/12/myiphone</code> he can just do so using simple form which will update in the database.</p>
  
  <p>How can I achieve this? </p>