I am a PHP web developer. I have a project for modifications. Previously on this project a coder worked in PHP 5 which i have not used yet. I have started work on it, become able to run but one problem i am facing continously and that is when i browse categories a path like this is appearing <!-- m --><a class="postlink" href="http://localhost/my-site/browse/air_...r_Conditioners">http://localhost/my-site/browse/air_...r_Conditioners</a><!-- m -->. As there is no browse directory according to url, but there is file "browse" without extension. Can anyone let me know what coding technique the previous coder used.Sounds like mod_rewrite (<!-- m --><a class="postlink" href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html</a><!-- m -->) to me.there will be a .htaccess file in there too, which most probably is forcing the file "browse" to be treated as a php file, even though it has no extension. this file then acts as a virtual folder, and all the requests appended to this file i.e. /browse/ etc are then handled by this file. hope this helps.<!-- m --><a class="postlink" href="http://www.w3.org/TR/chips/#uri">http://www.w3.org/TR/chips/#uri</a><!-- m -->
A common mistake, responsible for many HTTP implementations problems, is to think this is equivalent to a filename within a computer system. This is wrong. URIs have, conceptually, nothing to do with a file system. One should remember that at all times when dealing with the World Wide Web.I suspect that goldbug is wrong and daarius is right - mod_rewrite is NOT being used, rather there is a PHP file called "browse" (note: no extension). This is executed by PHP because Apache's rules (either in httpd.conf or .htaccess) tell it to.
Then it uses PATH_INFO to discover what was requested.
This is a nice way of doing it; I use it often.
Mark
A common mistake, responsible for many HTTP implementations problems, is to think this is equivalent to a filename within a computer system. This is wrong. URIs have, conceptually, nothing to do with a file system. One should remember that at all times when dealing with the World Wide Web.I suspect that goldbug is wrong and daarius is right - mod_rewrite is NOT being used, rather there is a PHP file called "browse" (note: no extension). This is executed by PHP because Apache's rules (either in httpd.conf or .htaccess) tell it to.
Then it uses PATH_INFO to discover what was requested.
This is a nice way of doing it; I use it often.
Mark