I have a controller setup to accept two vars: /clients/view/var1/var2
And I want to show him how /var1/var2
So i try
Router::connect('/*', array('admin'=>false, 'controller' => 'clients', 'action' => 'view'));
But this stops all other controllers working as /*routes all
All other pages on the site are prefixed admin, so basically I need a route that is ignored if the current prefix admin! I tried this (regex from regex to match a string that doesn't contain a word? ):
Router::connect('/:one', array('admin'=>false, 'controller' => 'clients', 'action' => 'view'), array(
'one' => '^((?!admin).*)$'
));
But I think the regex is wrong, because if I'm on /test, it asks for a test controller, not clients
My other routes:
Router::connect('/admin', array('admin'=>true, 'controller' => 'clients', 'action' => 'index'));
Router::connect('/', array('admin'=>false, 'controller' => 'users', 'action' => 'login'));
What am I doing wrong? Thank.