title: Using .htaccess to clean GET URL
body: <p>Before anyone comments, I know there are a lot of posts created on this topic, but none of them seem to solve my problem, that is why I have started this thread.</p>
  
  <p>So, I have a page in my website called <code>project.php</code> which is used in <code>GET</code> query like so: <code>project.php?id=12</code> I want to have a .htaccess file that converts the given URL into <code>localhost/MyWeb/project/id/12/</code>. I've literally followed every single post regarding that topic but none of them seem to work.</p>
  
  <p>Also, along with that, I want all my <code>.php</code> and <code>.html</code> files to be shown just with their names, i.e <code>localhost/MyWeb/index.php/</code> becomes <code>localhost/MyWeb/index/</code> and <code>localhost/MyWeb/sub1/sub2.php</code> becomes <code>localhost/MyWeb/sub1/sub2/</code>.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The reason why I did not add my work in first place was because I didn't think it would be any helpful. But here it is:</p>
  
  <pre class="lang-bash prettyprint-override"><code>RewriteEngine On
  
  RewriteRule ^([0-9]+)$ project.php?id=$1
  RewriteRule ^([0-9]+)/$ project.php?page=$1
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  RewriteRule ^([^\.]+)$ $1.html [NC,L]
  </code></pre>