Given: old ugly urls like /somepage?ln=en
are rewritten in htaccess to /en/somepage
Given: used canonical meta tag, with this php script above it to fill in the tidy url:
How to make them like the canonical?
<link rel="canonical" href="<?=$canonicalURL?>">
What ways can one parse the current url without any strings, or, delete the extra strings from the url and put it into the canonical url?