diff --git a/Url.php b/Url.php index 358733d..9bf5421 100644 --- a/Url.php +++ b/Url.php @@ -77,7 +77,10 @@ function getCanonical($domains=null,$httpSubstitution=false,$isStatic=false){ else $canonical .= $mainDomain; $canonical .= $this->getPortHref().'/'.$this->getSuffixHref(); - if($httpSubstitution&&http_response_code()!==200){ + if(is_string($httpSubstitution)){ + $canonical .= $httpSubstitution; + } + elseif($httpSubstitution&&http_response_code()!==200){ $canonical .= http_response_code(); } else{