diff --git a/control/Director.php b/control/Director.php index b0c7cea8f..f8c23b6df 100644 --- a/control/Director.php +++ b/control/Director.php @@ -425,7 +425,7 @@ class Director implements TemplateGlobalProvider { } if(substr($url,0,4) != "http") { - if($url[0] != "/") $url = Director::baseURL() . $url; + if(strpos($url, '/') !== 0) $url = Director::baseURL() . $url; // Sometimes baseURL() can return a full URL instead of just a path if(substr($url,0,4) != "http") $url = self::protocolAndHost() . $url; }