Hi,
I am having a lot of indexing errors and warnings from google because it is indexing urls’s that shouldn’t exist but that link to individual images on the site by their filename (without the .jpg or whatever) or what seems to be listed in “Title” meta (automatically applied when uploaded). These pages then have a comment box, even though (I thought) commenting is completely disable on the site. It should surely not be possible to access image via URL without /wp-content/uploads/… etc etc in the url path?? How does this url jump directly to the actual image for comment?
Is there any way to prevent this from happening – ie that only site url’s that are valid in sitemap are seen and everything else gives error? I am not sure of expected result from adding “/feed” but this should not happen by creating url to an image that is top level on site (as in examples in private box).
Thanks
Update – I have found a code snippet for the child functions.php that seems to work now by redirecting to the parent page? Maybe this is the solution. I am trying it now so those urls above do not work anymore so it seems as my problem may now be solved!
“Solution” from:
and code snippet from: “Redirect Via Custom Function” on that page