php - Codeigniter routing question -
i have ci application organized folders. have several folders on views, controllers , models.
ie.: /controllers/frontend/, controllers/backend /views/frontend, views/backend
... etc ...
so if want access function 'login' on frontend controller have go to: http://localhost/frontend/login/index
what want rid of need of typing 'frontend', if type http://localhost/login/index, same http://localhost/frontend/login/index.
of course dont want add them manually routes file, want recognized automatically.
thanks.
try changing line 17 in config.php file in application\config.
$config['base_url'] = 'http://localhost/'; change above below:
$config['base_url'] = 'http://localhost/frontend/';
Comments
Post a Comment