title: Use text from URL after slash as parameter - htaccess
body: <p>I need to rewrite this:</p>
  
  <pre><code>http://example.com/new/location/
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>http://example.com/new.php?p=location
  </code></pre>
  
  <p>Btw it could be anything after new/ for example i need:</p>
  
  <pre><code>http://example.com/new/anything
  </code></pre>
  
  <p>to actually be:</p>
  
  <pre><code>http://example.com/new.php?p=anything
  </code></pre>
  
  <p>But i need to keep the URL structure with the slashes for SEO and security purposes</p>
  
  <p>How could i achieve this using .htaccess?</p>
  
  <p>currently in my htaccess ive got:</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /dir/
  </code></pre>
  
  <p>Thanks</p>