Pass a Variable to the default_controller Via /$variable, How? |
[eluser]jmrhoades[/eluser]
In routes.php I have: Code: $route['default_controller'] = "schedule"; my /controllers/schedule.php file looks like this: Code: <?php I can't figure out a way to pass an argument to the default index() function of my Schedule controller. I've tried URI routing like this to no avail: Code: $route['/(.+)'] = 'schedule/index/$1' Code: $route['/(.+)'] = '/index/$1' Code: $route[':any'] = '/index/$1' I'm trying to use url's that look like Code: www.somesite.com/this-is-a-var
[eluser]jmrhoades[/eluser]
Never mind, I'm an idiot. This did the trick in routes.php: Code: $route['(:any)'] = "schedule/index/$1"; |
Welcome Guest, Not a member yet? Register Sign In |