Forum Moderators: Robert Charlton & goodroi
I have a small question that I can't get an answer to.
I assume everybody heard about rel canonical,.. ok.
So my issue is..
I have Page A, and Page B.
I have to put a rel canonical tag on Page B, so that it points to Page A.
However, since it is the exact same page(dynamic content), if I put a rel canonical tag on Page B, it also appears on page A.
So basically, Page A is also pointing to Page A.
Did anybody had the same issue?..
It is ok for the canonical page to have a 'link rel="canonical"' pointing to itself?
Thank you very much !
if(strstr($_SERVER['REQUEST_URI'],"PageB.html")) {
$AddTheRel="<rel link here>";
}
OR if you are using Query_Strings, maybe like this:
if(strstr($_SERVER['QUERY_STRING'],"PageB")) {
$AddTheRel="<rel link here>";
}
ADDED:
Sorry if I sound blunt, it's late here. =)