Considering: old ugly URLs, such as /somepage?ln=en, are rewritten in htaccess to /en/somepage
Given: the canonical meta tag is used, with this php script above it, to fill in a neat URL:
How to make them look like canonical?
<link rel="canonical" href="<?=$canonicalURL?>">
How can I parse the current URL without any lines or remove extra lines from the URL and put it in the canonical URL?
source
share