title: Issue with htaccess configuration
body: <p>I'm trying to create clean/pretty URL for a website project such that <code>.php</code> extensions will be hidden and I'll be able to convert a URL like</p>
  
  <pre><code>example.com/user.php?profile=john-doe
  </code></pre>
  
  <p>to</p>
  
  <pre><code>example.com/user/john-doe
  </code></pre>
  
  <p>this is the code I was able to come up with:</p>
  
  <pre><code>RewriteEngine On
  # Rewrite /foo/bar to /foo/bar.php
  RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L]
  
  # Return 404 if original request is /foo/bar.php
  RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$" [NC]
  RewriteRule .* - [L,R=404]
  
  # NOTE! FOR APACHE ON WINDOWS: Add [NC] to RewriteCond like this:
  # RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$" [NC]
  
  #setting query for querying pages
  RewriteRule ^(.*?)/(.*?)/?$ $1?name=$2 [NC]
  </code></pre>
  
  <p>but it us not working, I'll be grateful if I can get this fixed or a better complete <code>.htaccess</code> configuration to achieve my aim.</p>