if (match($filepath,'/IMG') || match($filepath,'/cache-gd2') ) { $ndd = replace(_ADAPTIVE_IMAGES_DOMAIN,'http://',''); $filepath = replace($filepath,'/IMG','/sites/'.$ndd.'/IMG'); $filepath = replace($filepath,'/local/cache-gd2','/sites/'.$ndd.'/local/cache-gd2'); $filepath = rtrim(_ADAPTIVE_IMAGES_DOMAIN,"/")."/sites/$ndd/".$filepath; }