title: URL rewriting in PHP without htaccess
body: <p>Website is running on a web host where we don't have access to a <code>.htaccess</code> file. However, I want to do URL rewriting for user friendly URLs.</p>
  
  <p>e.g. Original URL</p>
  
  <pre><code>www.example.com/file?q=name
  </code></pre>
  
  <p>expected URL</p>
  
  <pre><code>www.example.com/file/name
  </code></pre>