If you come across issues where you used http: on your staging
website, and https: on your live site, you can replace this url by not
including the mentioned above. Simply use the following functions:
function remove_http($url) {
$disallowed = array('http:', 'https:');
foreach($disallowed as $d) {
if(strpos($url, $d) === 0) {
return str_replace($d, '', $url);
}
}
return $url;
}
No comments:
Post a Comment