My controller structure (api is the folder inside controller)
controllers/api/Api_1_0.php
controllers/api/Api_2_0.php
In my routes.php
$route['api/(\d+)\.(\d+)'] = "api/Api_$1_$2";
$route['api/(\d+)\.(\d+)/(:any)'] = "api/Api_$1_$2/$3";
The routing strategy i need is, if /api/2.0 is specified it will point to controller file Api_2_0.php
ie. api/x.y points to file Api_x_y.php
Everything working fine with above routing but below is my issue:
https://www.example.com/api/2.0/photos/1234567890 // not working
https://www.example.com/api/2.0/photos // working
How to solve ?