Please help with routing problem! |
[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/1865bd2d9bd63...0f98920d63 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/1865bd2d9bd63...0f98920d63 will equall to http://www.mysite.com/redirect/goto/1865...0f98920d63 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";
[eluser]Pascal Kriete[/eluser]
Routes are regular expressions - you need a capture group in there: Code: $route['link/(:any)'] = "/redirect/goto/$1";
|
Welcome Guest, Not a member yet? Register Sign In |