PHP Code:
$router = Zend_Controller_Front::getInstance()->getRouter();
//tag/product
$router->addRoute(
'product',
new Zend_Controller_Router_Route('tag/:product', array('controller' => 'products', 'action' => 'index'))
);
tag/category/product
$router->addRoute(
'category-product',
new Zend_Controller_Router_Route('tag/:category/:product', array('controller' => 'products', 'action' => 'index'))
);
//tag/category/sub-category/product
$router->addRoute(
'subcategory-category-product',
new Zend_Controller_Router_Route('tag/:category/:sub-category/:product', array('controller' => 'products', 'action' => 'index'))
);
These rules should work, provided that you dont have any forward slashes in your product or category names.