-
weird wordpress no 404 not found bug?
hi guys,
just wanted to ask if somebody noticed the following.
let's say you have your wp configured as domain.com/%postname%/
if you have domain.com/test-page/ as a page, and you go to domain.com/test-page/whatever-not-existing/ you will get a 404 not found redirect to your 404 page, as expected.
if however you would go to domain.com/test-page/555/ (555 could be anything numeric) then you will NOT get a 404 not found redirect to your 404 page. so weird? check it on your own site, probably you will have the same issue.
i found out about this because in the new search console i found some pages with numbers behind it like that in the index coverage / alternative page with correct canonical tag part.
does anybody know how to solve this issue?
-
-
typical, after i posted this i found the solution, as described over here,
https://stackoverflow.com/questions/...-with-a-number
it's because of pagination.
on that link above you will find an add_action for your functions.php which actively checks in your page if you're using the nextpage option, and if the number that is added to your url is higher than that , it will give a 404.
no idea why this is not solved in wp itself.
solved!
-
The Following 2 Users Say Thank You to yeahfree For This Useful Post:
Cash Bonus (24 June 2018), matthewt (27 June 2018)
-
Good job on figuring that one out! Keep up the motivation to solve all your work issues.
Sounds like you get things done.
Last edited by matthewt; 25 June 2018 at 9:05 pm.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules