all4coffee:
I think I uderstand but this is really beyond my technical knowledge. Your code still seems to work and it did eliminate about 300 out of 1600 reported by Google "duplicate content" links.
It may take some time for google to check all links, so more might be taken out with time. For me the number has been steadily declining over the past few days.
all4coffee:
Today however I got this sitemap warning from Google:
URLs not followed
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot because they contained too many redirects. Please change the URLs in your Sitemap that redirect and replace them with the destination URL (the redirect target). All valid URLs will still be submitted
And here are the "guilty" URL listed by Google (first URL in each pair is as it is listed by Google, the ones below in each pair I added as they are being displayed after being redirected by your code)
http://www.all4coffee.com/index.php?main_page=product_info&products_id=158
http://www.all4coffee.com/index.php?main_page=product_info&cPath=11&products_id=158
http://www.all4coffee.com/index.php?main_page=product_info&products_id=199
http://www.all4coffee.com/index.php?main_page=product_info&products_id=159
http://www.all4coffee.com/index.php?main_page=product_info&products_id=91
http://www.all4coffee.com/index.php?main_page=product_info&products_id=64
The above confuses me even more... I was under impression that the code redirects duplicates with 301 permanent redirect so Google takes a note of this and indexes only the one w/ cPath
That is really weird..
I've compared your headers with the one from my own site, and they're no different, except for the 301 OK message (which is fine according to all search results I've found about it), and server specific info.
They're also the same messages as other redirects have given that I've been using for months on our site.
The only thing I've noticed is that these zen-cart redirects give two results on this header check site: http://www.seoconsultants.com/tools/headers.asp.
The first is the page that redirects and it's code, the second is the result of the page it was redirected to.
I made three small test php files that redirect to eachother (1 to 2, 2 to 3, 3 shows some text and it ends there), and those show two things.
1: When redirecting from the first testfile, it only shows info about the page it's redirected to, and no redirects after that. So if your site was redirecting multiple times, it should (I think), show only the first redirect. Since the header checker shows the correct redirected page for your site, it would seem that it doesn't redirect multiple times, as google seems to imply.
2: The test pages show only one result, where zen-cart redirects show two. The test page shows only the result from the page redirecting, and not the page it redirected to, while zen-cart links do.
To be honest I have no idea what any of that means, I'm just hoping someone more knowledgable can do something to help with that info.
all4coffee:
Here is the link to my products Sitemap which Google took "samples" from:
http://www.all4coffee.com/sitemapproducts.xml
I'm using Google Sitemaps module (v.1.3.14) to generate my sitemaps. Should I upgrade to the latest vesion of Sitemaps (maybe generated links will look different on updated version of this mode? - I couldn't find any info on it). Also there is an Ultimate SEO mode - would this help? I'm lost.
Dunno about Ultimate SEO, I've read nothing but trouble from those kinds of mods...
I don't see anything odd in the sitemap file either, linkwise, but upgrading might help, no idea though.
....hold on, just compared it to mine, and while the only real difference is that the graphical edges around the links look a little different... None of the links in my or your sitemap have any cPaths, what the hell? o_O