Is your link appearing on a sites page (component is rendering the content on html page)? If so, the link transformer should modify the link if that is handled in the code. Transformer code should read the correct tag in order to modify the link. Also, if the links are on page, you can use sling map...