rewrite the youtube vimeo url
// function to rewrite the VIMEO YOUTUBE URL
function mod_url($url){
$yt = strpos($url, 'youtube');
$vim = strpos($url, 'vimeo');
if($yt):
$url = str_replace("watch?v=","v/",$url);
endif;
if($vim):
$url = str_replace("vimeo.com","player.vimeo.com/video",$url);
endif;
return $url;
}