Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
add variable path in canonical href
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Nov 7, 2015
1 parent 5e1e68a commit a9fccb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit a9fccb1

Please sign in to comment.