php - How to create custom urls in cakephp -


i have created cakephp app. have urls looks like

www.mysite.com/products/search/hardware 

it loads fine. want urls looks

www.mysite.com/hardware 

can achieved setting route connect

i appreciate help.

thanks.

yes, can use route.

router::connect(     '/hardware',     array('controller' => 'products', 'action' => 'search', 'hardware') ); 

for more general solution (any category name routing products/search) see http://book.cakephp.org/view/948/defining-routes


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -