![]() |
have a problem with routing - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: have a problem with routing (/showthread.php?tid=42846) |
have a problem with routing - El Forum - 06-21-2011 [eluser]Deathcode[/eluser] Hi.... I have a problem with routing. I hope anyone of you can help me to solve this problem.... Let's say, i have a url like this : http://localhost/goofeel_temp/articles/get_articles/tutorial Note : "articles" is the name of my controller, "get_articles" is my_function, and "tutorial" is my first parameter. And i want to change my url like : http://localhost/goofeel_temp/tutorial So i create a route like this : Code: $route['articles/(:any)'] = 'articles/get_articles/$1'; And it's working. But the problem occur when i have a new function that makes my url look like this : http://localhost/goofeel_temp/articles/get_detail_articles/tutorial/how-to-create-pagination Note : "articles" is the name of my controller, "get_detail_articles" is my_function, "tutorial" is my first parameter and "how-to-create-pagination" is my second parameter. And i want to change my url into something like this : http://localhost/goofeel_temp/tutorial/how-to-create-pagination What should i do to create a "clean" url like that??? thanks before.... have a problem with routing - El Forum - 06-22-2011 [eluser]toopay[/eluser] Use either hook or remap, for better flexibility. |