title: How to remove .php extension and add slash on the url?
body: <p>Here is my current .htaccess code</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} !-f  
  RewriteRule ^([^\.]+)$ $1.php [NC,L] 
  </code></pre>
  
  <p>it is works only in removing .php extension</p>
  
  <p>from 
  <code>http://localhost/mysite/news.php?category=cat1&amp;id=1</code> 
  to 
  <code>http://localhost/mysite/news/cat1/1/</code></p>
  
  <p>and from</p>
  
  <p><code>http://localhost/mysite/news.php?category=cat1&amp;year=2011&amp;month=10&amp;day=25&amp;id=1</code> 
  to 
  <code>http://localhost/mysite/news/2011/10/25/1</code></p>
  
  <p>How to write complete .htaccess for the clean url above?</p>