We tried to implement this scenario in ee 1.13: we have a custom product attribute (new_edition_id), when a product is saved, if this attribute is set, we want to create a url rewrite from current product to the product with attribute id equals to new_edition_id. We've implemented it in an observer using this snippet of code:
$rewrite = Mage::getModel('enterprise_urlrewrite/url_rewrite'); $rewrite->setStoreId($storeId) ->setOptions('RP') ->setIdentifier($requestPath) ->setTargetPath($targetPath) ->setRequestPath($requestPath) ->setDescritpion('Nuova Edizione plugin') ->setProductId($product->getId()) ->save();
The result is that some records are inserted in enterprise url rewrite tables, but from the front end redirections doesn't work. Any suggestion?