If your doing this in a template, you have 2 options:
1) Using PHP in your templates. Replace "YOURSMARTYVARIABLE" with your variable.
Code:
{php}
$newvariable = $GLOBALS['smarty']->_tpl_vars['YOURSMARTYVARIABLE'];
echo str_replace($newvariable,"","/home/server/apple/html/");
{/php}
2) Use the PHP command str_replace by passing it as a modifier
http://smarty.php.net/manual/en/api.register.modifier.php[/code]