: Http header rel=“canonical” through htaccess for dynamic content 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 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.
More posts by @Courtney195
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.