title: Automatically Convert all external links to affiliate links
body: <p>I would like to be able to automatically change links into affiliate links on my Wordpress and Mybb installation. This would help to reduce the amount of time managing links in case the code needs to be changed in the future as you know advertiser keeps changing the affiliate websites from one another.</p>
  
  <p>This is my setup of bestylish.com affiliate scheme.
  If the url is  suppose :  <a href="http://www.bestylish.com/men-shoes" rel="nofollow noreferrer">http://www.bestylish.com/men-shoes</a><br>
  I need to make it this :- <a href="http://affiliates.tyroodr.com/ez/arttnpokwow/&amp;lnkurl=http://www.bestylish.com/men-shoes%3Futm_source%3Dtyroo%26utm_medium%3Daffiliate%26utm_campaign%3D12june12_20percenteossoffer" rel="nofollow noreferrer">http://affiliates.tyroodr.com/ez/arttnpokwow/&amp;lnkurl=http://www.bestylish.com/men-shoes%3Futm_source%3Dtyroo%26utm_medium%3Daffiliate%26utm_campaign%3D12june12_20percenteossoffer</a></p>
  
  <p>I also need to have a http:// always before starting www.bestylish.com
  if its there, it ok, if its not there, then i need to add it otherwise it wont be redirected correctly.</p>
  
  <p>The same Kind of thing is here : <a href="https://stackoverflow.com/questions/11798336/change-all-website-links-to-affiliate-links-automatically">Change all website links to affiliate links automatically</a></p>
  
  <p>But this talks about appending the code at the end only, whereas i have to append the code at the beginning too. Also this doesn't talk about adding http://  in the beginning everytime.
  Can anyone help me with this?</p>
  
  <p>Thanks you.</p>