Welcome Guest, Not a member yet? Register   Sign In
Auto set routes in codeigniter
#1

I would like to know if it is possible to get codeigniter routes.php to auto detect routes.

Because each time I have to create a route like below

PHP Code:
$route['route=common/dashboard'] = 'common/dashboard/index';
$route['route=user/user'] = 'user/user/index';
$route['route=user/user/edit(:any)'] = 'user/user/edit$1'

I can get route by just doing this echo $this->input->get('route');

I also have enabled $config['uri_protocol'] = 'QUERY_STRING'; to make it work with my htaccess

Example Link http://localhost/project-dashboard/index.../dashboard working perfect

I will save a lot of time. Any suggestions.
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
Auto set routes in codeigniter - by wolfgang1983 - 06-30-2015, 04:33 AM
RE: Auto set routes in codeigniter - by skunkbad - 07-03-2015, 03:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB