I have the following preg_match to replace any html links to another url it works except it also changes the base_href value – I want it to totally ignore the base href value
$message = preg_replace("/href=\"http\:\/\/([a-zA-Z0-9\-]+\.[a-zA-Z0-9]+\.[a-zA-Z]{2,3}(\/*)?)/","href=\"http://www.site.com/system/link_tracker.php?URL=$1&ID={$ID}\"", $message);
Any ideas how to edit this to only look at a href and not the base href?
1 Answer