I'm not quite sure that "rewritten URL" means request_path or target_path in the context of your question, but anyway.
To get the request path to a single product, you can do this:
$oProduct = Mage::getModel('catalog/product')->load($productId); var_dump( $oProduct->getUrlPath() );
To get the target path, you can use this:
$oProduct = Mage::getModel('catalog/product')->load($productId); $oRewrite = Mage::getModel('core/url_rewrite')->loadByRequestPath( $oProduct->getUrlPath() ); var_dump( $oRewrite->getTargetPath() );
JΓΌrgen thelen
source share