I’m planing to develop mid size website. I want to use SEO friendly url’s like
http://foobar.com/category/fun/
http://foobar.com/article/lorem-ipsum.html
As you can see I want to use slugs for controllers names.
I intend to implement it in the following way.
One file to handle all requests.
In routes.php
$route['(:any)'] = 'my_routes/$1';
And then in my_routes with $this->uri->segment I can determinate which controller is requested.
Is it good idea to use just one file (my_routes) for entire website ?
Can you recommend me some better solution ?
Yes, it’s good decision. I do the same in my projects, all routes via index.php and .htaccess file configured to send all URLs on index.php.