Why does WordPress allow multiple page-slugs in url without triggering 404?
-
The title is pretty self explanatory, but I’m trying to figure out why WordPress allows this or if it’s a setting in .htaccess perhaps, but here’s the example:
I have a page, lets say a “Contact” page with the slug of “contact-us”.
I go to https://example.com/contact-us/ — everything works normally
I go to https://example.com/contact-us/contact-us/contact-us/contact-us/contact-us/contact-us (I could do this a million times) and it does NOT trigger a 404 error!
Why is this? If I enter a random string of numbers, it instantly triggers 404.php, but just repeating the page-slug does not trigger a 404.
I would like the page-slug to not be able to be repeated over and over again and trigger a 404 if it even gets repeated once.
Has anyone else experienced this issue? Is it possibly a canonical link issue or a “nofollow”? I just don’t understand why WordPress is not seeing this as 404 material.
Thanks in advance for any replies, suggestions, and help.
- The topic ‘Why does WordPress allow multiple page-slugs in url without triggering 404?’ is closed to new replies.