<?php

$link = "http://google.com";
$link = str_replace("http://","http://myprefix/",$link);
print("<a href='$link'>Download</a>");

?>