I believe this might be a lame question, but i found this url:
http://www.trickingpt.com/index.php/componentes/componente-artigos/tricks/basicmoves?id=125
The question is simple:
How is it possible for a url to have like a folder hierarchy after a php file and then the get parameter?
At first i thought it would be some script trick that i didn’t know, but then i noticed this on the page that lead to the other referred above:
href=”/index.php/componentes/componente-artigos/tricks/basicmoves?id=125″
Thanks in advance.
This is quite simple. The
index.phpis using$_SERVER["PATH_INFO"]to read the path requested (the part after index.php) and then executes appropriate code to return the response.It is very likely the website linked is using a framework that handles these urls and routes this “folder hierarchy” paths to respective controllers. Like, for example, does Kohana framework.