Msg#: 4557246 posted 12:42 am on Mar 22, 2013 (gmt 0)
That looks like Google indexed the page(s) before you set permalinks and has kept them because they still resolve. If the pages resolve to the new permalink structure then put a redirect plugin in place and redirect the old URLs where you want with a 301.
Msg#: 4557246 posted 8:24 pm on Mar 22, 2013 (gmt 0)
There's a third possibility. This happens with or without query strings. Periodically you'll see the googlebot asking for something like
:: shuffling papers ::
The search engine is testing whether your site returns a 404 when the page genuinely doesn't exist. In the case of php pages, the fix almost always lies in the php itself. If the parameter itself has meaning, the script has to return a 404 when it points to a nonexistent page-- like a post whose number puts it somewhere in the summer of 2016.
If the parameter has no meaning-- or if you don't use it at all, but someone else does-- tell search engines to ignore it.
Msg#: 4557246 posted 9:39 pm on Mar 22, 2013 (gmt 0)
It seems that Categories and Pages allow the added "?p=xyzetc" and the previous url and content remains.. but if I add it to a blog post.. it redirects to the actual blog url... not sure how to resolve that...
Msg#: 4557246 posted 10:10 pm on Mar 22, 2013 (gmt 0)
if you can't figure out how to fix this with a WP config change and if all parameter strings on category and page urls are non-cnaonical, you could do this using mod_rewrite. (assuming you can recognize category/page url patterns and assuming you're hosted on apache)
Msg#: 4557246 posted 3:59 am on Mar 23, 2013 (gmt 0)
Got it. If WordPress receives a request for something it has been told to look out for, it processes the request and issues redirects to keep the URL looking pretty. But if it receives a request for something it doesn't expect-- like, say, an URL bearing parameters that originated in a search engine's fevered imagination-- then it doesn't know what to do. It processes the familiar part and ignores the rest.
So then you're back with the two-part solution. One part is to tell the googlebot to ignore certain parameters. There will be a list on the "parameters" page of wmt. The other part is to forcibly redirect any request that contains a query string. Your RewriteRule will need a preceding condition looking at THE_REQUEST so you're only redirecting external queries, not internal ones.
But you will have to be very careful in your htaccess file. It already contains things WordPress put there to make the whole thing work. Make sure your additions are in the right place, where they won't conflict with anything that is already there.
And as long as you're in there, you can probably do some cleaning up. Your average CMS htaccess file is an unholy mess ;)