I would like to know how to change this URL:
http://www.example.com/category/test.php
to this URL:
http://www.example.com/category/test/
We don’t want to use any file extension in the end of the file name (like .html , .php). Is there any suitable way to edit the url in PHP based website?
What you’re looking for are pretty or clean URLs. You can accomplish this using the Apache mod_rewrite module, see http://httpd.apache.org/docs/current/mod/mod_rewrite.html
There are loads of systems (e.g., WordPress, Drupal, Expression Engine, CakePHP, ZendFramework) that implement these for you. If you have a quick look for “Pretty or Clean URL Rewriting” on Google or Bing you should find a load of resources to implement this in a way that is suitable for your project.
This is a pretty easy to follow and to the point article, see http://net.tutsplus.com/tutorials/other/using-htaccess-files-for-pretty-urls/ or http://docforge.com/wiki/Clean_URL