how to pass a parameter to the controller through the route? |
(08-30-2016, 01:28 PM)Angelo Wrote: Hello guys! I need to pass a parameter to the controller through the route, however, as it is a fixed parameter for each route does not want him to interfere in the url. It is something like this: $route['default_controller'], as the name says, just set the default controller when you enter http://yourdomain.com in the URL. In your case i would use: PHP Code: $route['/(:any)'] = '/normalroute/$1'; Or you can just set your default controller to 'normalroute': PHP Code: $route['default_controller'] = "normalroute"; Every call to http://yourdomain.com would go to your 'normalroute' and every parameter passed to it. Here is the explanation Hope this helps. Regards. |
Messages In This Thread |
how to pass a parameter to the controller through the route? - by Angelo - 08-30-2016, 01:28 PM
RE: how to pass a parameter to the controller through the route? - by portaflex - 08-30-2016, 04:31 PM
|