Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic URLs in CodeIgniter?

How to get URLs like /user/bob user/martin dynamically in CodeIgniter?

like image 290
adaxa Avatar asked Jul 15 '26 00:07

adaxa


1 Answers

You need to set up custom routing for the controller in application/config/routes.php, e.g.

$route['user/(:any)'] = "user/user_controller_method/$1";
like image 119
James Goodwin Avatar answered Jul 17 '26 13:07

James Goodwin