I want to change my URL from
www.mydomain.com/data/2
to
www.mydomain.com/name-data
i try to config in my routes.php
like this
$route['(.*)'] = 'data/$1';
$route['login-resgistration'] = 'f/login/index';
but when I type on address bar
www.mydomain.com/login-registration
or
www.mydomain.com/anotherword
it returns to data controller.
You have to declare all the routes before the main data controller route.
$route['login-resgistration'] = 'f/login/index';
$route['my-account'] = 'f/login/myaccount';
$route['(.*)'] = 'data/$1';
Hope this will work.