Reputation: 2489
This is what I've in the config/routes.php
$route['music/artist/:any'] = "music/artist/index/$1";
And I've my controller, 'artist', inside a folder music/
I tried to get the uri segment inside the index method from the artist controller but when I go to the browser with domain.com/music/artist/abc it returns page not found.
How can I make this work? But I want to have my controller inside that folder.
Any help will be great. Thanks.
Upvotes: 1
Views: 340
Reputation: 396
Use this in config/routes.php
$route['music/artist/(:any)/(:any)'] = "music/artist/index/$1";
Upvotes: 2