[eluser]Unknown[/eluser]
Happy New Year everyone!
OK so I am sure my problem is easily resolved, but it isn't obvious to me so maybe one of you experts can help.
I have a controller called products, with a bunch of methods, index shows all products by category, there is a method azproducts does the same thing but groups by letter, then i have a search method also. then each product has its individual view in the view method.
here are my routes:
$route['products'] = 'products';
$route['products/addtobasket/(:any)'] = 'products/addtobasket/$1';
$route['products/view/(:any)'] = 'products/view/$1';
$route['products/azproducts/(:any)'] = 'products/azproducts/$1';
$route['products/search/(:any)'] = 'products/search/$1';
$route['products/(:any)'] = 'products/index/$1';
Now I think the issue is to do with the bottom line, as if I remove 'index' from $route['products/(:any)'] = 'products/index/$1' it returns with a 404, but if i leave it in, it works. However with it left in, the search page then fails to work and routes to the index method instead. does anyone have any ideas what I am doing wrong?