CodeIgniter Forums
php URL routing. please help me to understand. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: php URL routing. please help me to understand. (/showthread.php?tid=18955)



php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]FutureKing[/eluser]
I have seen that codeigniter's urls look like this http://somesite.com/index.php/classname/methodname/value/

I am not expert in php. But I want to know that how to utilize the values after index.php.

Please help.


php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]JoostV[/eluser]
You'll find more here Smile


php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]Dam1an[/eluser]
Every one seems to be using lmgtfy now lol


php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]FutureKing[/eluser]
[quote author="JoostV" date="1243123188"]You'll find more here Smile[/quote]

I mean if I want to create everything manually in php how will I create such type of urls like codeigniter.


php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]Natebot[/eluser]
FutureKing,

Take a look at the source of CI_URI and CI_Router in system/libraries/URI.php and system/libraries/Router.php for how Codeigniter detects the URI string and uses it for routing, in particular the private functions. Then look at system/codeigniter/codeigniter.php for the client code that uses those classes to load controllers ,etc.


php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]Colin Williams[/eluser]
LMATFY:

Code:
// $_SERVER['PATH_INFO'], in most configurations, contains the path appended to the script file name;
// You can explode this into it's segments very easily
$uri_parts = explode('/', $_SERVER['PATH_INFO']);



php URL routing. please help me to understand. - El Forum - 05-23-2009

[eluser]FutureKing[/eluser]
[quote author="Natebot" date="1243127275"]FutureKing,

Take a look at the source of CI_URI and CI_Router in system/libraries/URI.php and system/libraries/Router.php for how Codeigniter detects the URI string and uses it for routing, in particular the private functions. Then look at system/codeigniter/codeigniter.php for the client code that uses those classes to load controllers ,etc.[/quote]

THANKS!