Please help with routing problem! - 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: Please help with routing problem! (/showthread.php?tid=11712) |
Please help with routing problem! - El Forum - 09-20-2008 [eluser]Gewa[/eluser] hi! routing in my application is not working , please help to fix .. i need when i go to http://www.mysite.com/link/1865bd2d9bd6386de8396e0f98920d63 in my website, it to open /redirect controller, function go_to and pass 1865bd2d9bd6386de8396e0f98920d63 as $name I have controller redirect with function go_to($name) so that the link http://www.mysite.com/link/1865bd2d9bd6386de8396e0f98920d63 will equall to http://www.mysite.com/redirect/goto/1865bd2d9bd6386de8396e0f98920d63 i added Code: $route['link/:any'] = "/redirect/goto"; to route.php, but the variable is not passing and i get Code: [b]$name variable is not set[/b] here is my full route.php Code: $route['default_controller'] = "start"; Please help with routing problem! - El Forum - 09-20-2008 [eluser]Pascal Kriete[/eluser] Routes are regular expressions - you need a capture group in there: Code: $route['link/(:any)'] = "/redirect/goto/$1"; Please help with routing problem! - El Forum - 09-20-2008 [eluser]Gewa[/eluser] oh thanks a lot!!! |