AlexB77 - 2:50 pm on Jan 7, 2012 (gmt 0)
I am trying to use the following on the template to automatically generate canonical links on every page when page is requested.
<link rel="canonical" href="<?php $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];echo $url;?>">
this works just fine, but only if your page is static .html doc with no query string in it such as ".html?blablabla"
Is there any way to clean the output so that it only outputs the actual link to be only .html and without any query string attached, even if there is one in the request URL?