1

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.

1 Answer 1

1

Setting up canonical links is done via the content and not the rewrite. Since you are using Joomla this can be easily achieved by using various plugins that allow you to manually set the formatting of the URLS via rewrite and it'll add the canonical links to your dymanic content.

You can use SH404SEF to do this as well as many others on Joomla's vast plugin library that you can explore, other methods include editing the template files and adding custom code to do this but of course you'd need to learn the Joomla handles in order to do so. If you want more in depth information then I recommend you ask your question on the Beta Joomla Stack or the official Joomla Forums.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.