routing - CakePHP routes for index with parameter -
in cake application, have referral program salespersons. each signup user can pass referral id. normally, website has default route following:
//www.mydomain.com -> www.mydomain.com/pages/home router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
now want route controller/action this:
//www.mydomain.com/r:1234 -> www.mydomain.com/users/signup/r:1234 router::connectnamed(array('r')); router::connect('/*', array('controller' => 'users', 'action' => 'signup')); router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
the routing signup works fine now, default route doesn't work anymore. think order ok. ideas?
if understood issue should this:
//www.mydomain.com/r:1234 -> www.mydomain.com/users/signup/r:1234 router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); router::connect('/signup', array('controller' => 'users', 'action' => 'signup'));
try one.
thanks
Comments
Post a Comment