When invalid child page entered, WP redirects to next available page instead of giving Page Not Found

Question

I have a number of customer pages set as parent pages, and then for each parent page I make two child pages. One child page is called client-page, and so to get to it you would enter a url like so:

https://mywordpresssite.com/barnacle-bill/client-page

But if I enter a customer parent page that doesn’t exist, something like this:
.

https://mywordpresssite.com/zzz/client-page

…WP will redirect me to another valid client-page. Not sure, but I think it redirects to the next, or perhaps the first available one.

so, WP will redirect me to /barnacle-bill/client-page

Each of these pages is password protected, so if my XYZ Market customer accidentally enters the wrong segment and ends up on barnacle-bill/client-page, they don’t get to see anything except for a login form. Nevertheless, what should happen is that WP should return a Page Not Found.

Stumped.

I have no WP caching. This happens on dev, staging, and production, so it’s not browser cache. Nothing in the .htaccess stands out as the culprit. I’m not using any redirect plugins.

I think it’s something WordPress does, and I think nobody’s noticed it before.

0
Galloway Grumblefield 1 month 2023-04-22T16:05:34-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse