title: Modify url with .htaccess file
body: <p>I would like to delete extensions like .php, .html, etc from my url and this is what I use:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC,L]
  RewriteRule ^([^\.]+)$ $1.html [NC,L]
  </code></pre>
  
  <p>It works but I don't know if this is the best way to do this and I also don't understand how it works, could someone explain it?</p>
  
  <p>The second thing I would like to realise is to make the URL more beautiful by doing something like this:</p>
  
  <p>this is my URL: <a href="http://domain.com/portfolio/project.php?id=1" rel="nofollow">http://domain.com/portfolio/project.php?id=1</a>
  this is what I would like to see: <a href="http://domain.com/portfolio/project/1" rel="nofollow">http://domain.com/portfolio/project/1</a></p>
  
  <p>Thanks in advance</p>