Kohana v2 - problem with routes
- by yoda
Hi,
I'm attempting to set some custom routes in Kohana v2. What I'm looking for is some method that allow the system to :
follow a pre-defined name to it's related root;
redirect the non-matched url's into another controller;
To give you a more clear view over the problem, I want the first url parameter to be associated to certain pages (contacts, home, services, about us, etc), and those urls who doesn't match the previous pages would be routed into a controller called products, in order to determine if the first url parameter regards a product name.
Here's a sample of what I have :
$config['_default'] = 'home';
$config['([a-zA-Z]+)'] = 'products/showcat/$1';
What am I missing here?
Thanks in advance!