JSFiddle - React, Tailwind, and code Playground
by Aaron Kahlhamer
HTML
<div id="landing-page">
<a href="/catalog.php?N=3000027652">catalog link 1</a><br/>
<a href="/catalog.php?N=3000000000">catalog link 2</a><br/>
<a href="http://www.mydomain.com/catalog.php?N=3000023333">catalog with domain</a><br/>
<a href="/upgrade/wishlist.php">upgrade link</a><br/>
<a href="http://www.pinterest.com">Pinterest</a>
</div>
JavaScript
$('#landing-page').find('a[href^="/catalog.php"]').each(function(element, index){
var href = $(this).attr('href');
href = href.replace('', 'http://www.mydomain.com');
$(this).attr('href', href);
});
$('#landing-page').find('a[href^="/upgrade"]').each(function(element, index){
var href = $(this).attr('href');
href = href.replace('', 'http://www.mydomain.com');
$(this).attr('href', href);
});