title: URL rewriting for sub-directory without changing base
body: <p>I want to rewrite the following URL:</p>
  
  <pre><code>https://www.example.com/tools/tool.php?id=predict-backlinks
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>https://www.example.com/tools/predict-backlink
  </code></pre>
  
  <p>As suggested here: <a href="https://stackoverflow.com/questions/29215708/url-rewriting-for-sub-folder">URL Rewriting for sub-folder</a></p>
  
  <p>Now the working URL is <code>https://www.example.com/tools/tool/predict-backlink</code></p>
  
  <p>The following code is working fine but <code>tool</code> is getting added in the URL. I want it to work without <code>tool</code> in the URL.</p>
  
  <pre><code>Options -MultiViews
  RewriteEngine On
  RewriteBase /tools/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^tool/(.*) tool.php?id=$1 [L]
  </code></pre>