I want to Get category/product url (URL rewrite url) and re-direct customer to that url after login. I tried getLastUrl from session / redirectReferrer. Both returns only the actual url and not the SEO ones. Is there any other possibility to achieve this on a common way. I will be using this redirect throughout the site on all pages, not only in PDP/PLP.
You could add static block with product to display upon logging in.
If you insist on a rewrite you will need to add mod_rewrite rule in your .htaccess
RewriteRule ^oranges.html$ apples.html
the site ending in "/oranges.html"— all of the information displayed will come from the "/apple.html" site.
if you do it with magento's "url rewrite management" you will have broken links every time you reindex