title: How remove extension inside url by rewrite
body: <p>How i can remove the extension <code>.php</code> from url like that:</p>
  
  <pre><code>https://example.com/file.php/a/b/b
  </code></pre>
  
  <p>When the file is on the end of url i use:</p>
  
  <pre><code>RewriteRule ^(.*)\.php/?$ $1 [R=301,L]
  </code></pre>
  
  <p>But the file is in the midle, how can i do that?</p>