I have a large number of URLS where I need to specify rel="canonical", The URL structure is like:
example.c.o.m/abcd?q=ccccc&location=ffff&x=pp&y=qq
I need to strip the last two parameters (&x=pp&y=qq)
and show example.com/abcd?q=ccccc&location=ffff
as my canonical link in the header.
I have this as moz reference and tried various ways with mod_RewriteRule. I'm looking for either a htaccess solution or that of one that works with Joomla CMS.