View Single Post
  #3 (permalink)  
Old 02-19-2008, 01:29 AM
TeriyakiDelight TeriyakiDelight is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2
Default

Thanks,
I read up on the router and it seems to work great.

For those who wish to know how I did it, in my public index I added:

PHP Code:
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Controller_Router_Rewrite');

$router = new Zend_Controller_Router_Rewrite();
$ctrl Zend_Controller_Front::getInstance();
$router $ctrl->getRouter();

$router->addRoute('product', new Zend_Controller_Router_Route('products/:productName', array('controller'=>'products','action'=>'view'))); 
So, instead of
http://site.com/Products/view/productName/<productName>

you can get the same result with
http://site.com/Products/<productName>
Reply With Quote