CI 3.0에서 라우팅 로직이 변경되었습니다.
핵심 소스코드를 살펴 보면 :any 와 :num 치환하는 부분이 아래 처럼 바꼈습니다.
// CI 2.2
$key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));
// CI 3.0
$key = str_replace(array(':any', ':num'), array('[^/]+', '[0-9]+'), $key);
이것이 버그인지 의도 한 것인지 모르겠지만 라우팅에 문제가 생겼습니다.
예를 들면
config/route.php
$route['edit/(:any)'] = 'rtest/index';
$route['edit'] = 'rtest/index';
2.2 에서는 위 코드를 config/route.php에 추가 하고
www_example_com/edit
www_example_com/edit/1
www_example_com/edit/1/2
www_example_com/edit/1/2/3
위와 같이 하면 rtest/index 로 라우팅이 됩니다.
하지만 3.0 에서는 위 코드 추가시
www_example_com/edit
www_example_com/edit/1
// 여기서 부터 에러가 남
www_example_com/edit/1/2
www_example_com/edit/1/2/3
첫번째 인자만 유효하게 처리하고 나머지 인자는 404페이지 에러로 처리 합니다.
2.2가 버그인지 3.0이 버그인지 잘 모르겠네요.
3.0에서 2.2 처럼 라우트를 사용하고 싶다면 (:any) 대신 (.+) 로 바꿔 주시면 됩니다.
// $route['edit/(:any)'] = 'rtest/index';
$route['edit/(.+)'] = 'rtest/index';
$route['edit'] = 'rtest/index';