/**
* absolute_to_maxcdn_url
* Converts absolute path to MAXCDN URL
*/
function absolute_to_maxcdn_url($filepath) {
if(__CHV_ROOT_DIR__===__CHV_RELATIVE_ROOT__) {
return __CHV_BASE_URL__.ltrim($filepath, '/');
}
return str_replace(__CHV_ROOT_DIR__, 'http://cdn.mysite.com/chevereto/', str_replace('\\', '/', $filepath));
}