title: PHP: Hide file extension from URL using .htaccess
body: <p>I want to hide file extensions from a URL like
  if the current URL is </p>
  
  <p><strong><a href="http://localhost/salsgiver/administrator/menus.php?sect=about" rel="nofollow noreferrer">http://localhost/salsgiver/administrator/menus.php?sect=about</a></strong></p>
  
  <p>then the new one will be exactly</p>
  
  <p><strong><a href="http://localhost/salsgiver/administrator/menus/sect/about" rel="nofollow noreferrer">http://localhost/salsgiver/administrator/menus/sect/about</a></strong></p>
  
  <p>and so on, similary if the current URL is</p>
  
  <p><strong><a href="http://localhost/salsgiver/administrator/products.php?id=1" rel="nofollow noreferrer">http://localhost/salsgiver/administrator/products.php?id=1</a></strong></p>
  
  <p>then the new one will be exactly </p>
  
  <p><strong><a href="http://localhost/salsgiver/administrator/products/1" rel="nofollow noreferrer">http://localhost/salsgiver/administrator/products/1</a></strong></p>
  
  <p>Or some thing different, so that the viewer could not guess the exact URL.</p>
  
  <p>I searched Google and found some matter on</p>
  
  <p><a href="http://roshanbh.com.np/2008/02/hide-php-url-rewriting-htaccess.html" rel="nofollow noreferrer">http://roshanbh.com.np/2008/02/hide-php-url-rewriting-htaccess.html</a></p>
  
  <p>and also used, but it does not work and the <code>mod_rewrite</code> module is also enabled in Apache. And when I create the .htaccess file to secure a folder from all using</p>
  
  <pre><code>deny from all
  </code></pre>
  
  <p>it works fine.</p>