uksitebuilder wrote:Attached is my canonical URL vqmod file that adds a canonical url to the category pages.
Please excuse me for digging up this old post, but I am looking for a way to include a canonical tag on the category pages that will always show the deepest level URL.
For example, if I visit
http://www.yoursite.com.au/cat-1/cat-2/cat-3 the canonical will show as
http://www.yoursite.com.au/cat-1/cat-2/cat-3.
However, if I visit
http://www.yoursite.com.au/cat-3, the canonical tag will still show as
http://www.yoursite.com.au/cat-1/cat-2/cat-3.
I would like to ensure that full page hierarchy is maintained in Google's eyes and also when visitors land on the site from the search results that they are presented with the complete breadcrumb path. With your current vQmod, the canonical tag is resolved to the root level for the category.
One of the other reasons I need this is because I have already used your current vQmod and all categories have been indexed at root level. So the only way to reverse this would be to add a vQmod that performs as outlined above otherwise the changes will never be noticed by Google. I probably should have simply not used a canonical tag for the categories in the first place but now that I have, this is the only way I can think of to force the changes I would prefer.
I know there is a way to achieve this as I found an OpenCart site that has this implemented. I contacted the owner but no reply.
Any ideas?