Results 1 to 3 of 3
  1. #1
    yeahfree is offline Private Member
    Join Date
    September 2011
    Location
    Mars
    Posts
    226
    Thanks
    36
    Thanked 161 Times in 92 Posts

    Default 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?

  2. #2
    yeahfree is offline Private Member
    Join Date
    September 2011
    Location
    Mars
    Posts
    226
    Thanks
    36
    Thanked 161 Times in 92 Posts

    Default

    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!

  3. The Following 2 Users Say Thank You to yeahfree For This Useful Post:

    Cash Bonus (24 June 2018), matthewt (27 June 2018)

  4. #3
    matthewt's Avatar
    matthewt is offline On Vacation
    Join Date
    July 2006
    Location
    US
    Posts
    526
    Blog Entries
    2
    Thanks
    1,003
    Thanked 140 Times in 111 Posts

    Default

    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
  •