Replacing links detected in a HTML with other links using JS
<p>I'm having a bit of trouble figuring out how to do this one. </p>

<p>Here's the scenario. My e-commerce site has a blog with a lot of content, promoting the products I sell, reviewing them etc. 99% of the posts on the blog link back to the products they are talking about.</p>

<p>I'm going to be changing the URL where my ecommerce system is located. Therefore my blog is going to end up sending people to a lot of 404 pages.</p>

<p>The idea I've had is to be able inclue a JS file which will on load, scan the document for existing links then, if found, swap them out with ones which are now correct.</p>

<p>I hope this make sense.</p>

<p>Cheers,
Jim</p>

<hr>
