You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
GWT has been reporting duplicate content for a while now. Not many pages reported but here is an example:
/Store
/index.php?app=ecom&ns=prodall&ref=&count=18&offset=486
/index.php?app=ecom&ns=prodall&ref=&count=18&offset=504
/index.php?app=ecom&ns=prodnew&ref=&prodsort=DEFAULT
I notice that the duplicate items are are old prodall and prodnew pages that appear under index.php with the same content as the Splash page. The URL parameters in GWT are same as CCP8. Any ideas how to rectify?
Last edited by sdn (05-17-2017 08:56:39)
Offline
Those URLs don't exist any more. It's basically targeting the splash page because they're coming in as index.php requests with invalid CGI parameters. But they're not SEO URLs which we'd redirect. I'd redirect all of them in your .htaccess using rules like this above your K9 rewrite rules:
RewriteRule /Store / [L,R=301] RewriteCond %{QUERY_STRING} prodall RewriteRule ^(.*) / [L,R=301] RewriteCond %{QUERY_STRING} prodnew RewriteRule ^(.*) / [L,R=301]
The above is untested, let me know if you have issues with it.
Offline
No it does not work and caused the browser to issue an error message. I did a quick search and found some similar code with ? after the / and that does at least not cause the error message but still not sure if it actually solves the problem. Could it be right?
RewriteRule /Store / [L,R=301]
RewriteCond %{QUERY_STRING} prodall
RewriteRule ^(.*) /? [L,R=301]
RewriteCond %{QUERY_STRING} prodnew
RewriteRule ^(.*) /? [L,R=301]
Offline
Try (UPDATED 2017-05-24):
RewriteRule /Store / [L,R=301]
RewriteCond %{QUERY_STRING} prodall
RewriteRule ^$ /? [L,R=301]
RewriteCond %{QUERY_STRING} prodnew
RewriteRule ^$ /? [L,R=301]
Offline
That also does not work. Chrome say "redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS"
So cleared the cookie - same result.
Changing to RewriteRule ^/(.*) / [L,R=301] or RewriteRule ^/(.*)$ / [L,R=301] allows the page to load but it still has "/?app=ecom&ns=prodnew&ref=&prodsort=DEFAULT" in the url.
I have removed almost all of the other rewrites from htaccess to perform these tests.
While on the subject of other rewrites and duplicate content, do we need to add a redirect that forces the site to only be served as www. or is K9 taking care of that?
Last edited by sdn (05-23-2017 10:17:14)
Offline