[wp-trac] [WordPress Trac] #53574: 404 redirect guessing should not apply on URLs with trailing slashes

WordPress Trac noreply at wordpress.org
Thu Jul 1 16:21:28 UTC 2021


#53574: 404 redirect guessing should not apply on URLs with trailing slashes
--------------------------+-----------------------------
 Reporter:  markjaquith   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Canonical     |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The original intent of the 404 redirect guessing functionality was to
 resolve URLs that got split in half by e-mail clients and the like. Some
 of them would see a dash in a URL and assume they could wrap it to the
 next line like a multi-syllable word, so you'd have people clicking links
 like `https://example.com/some-post-` because `with-a-long-slug/` got
 wrapped to the next line in the e-mail.

 But currently if you navigate to `https://example.com/bad-slug/` where
 that doesn't exist, but `https://example.com/bad-slug-exists/` does,
 you'll get redirected.

 This doesn't make much sense. The trailing slash on `https://example.com
 /bad-slug/` conclusively indicates that you didn't click a slug-truncated
 URL. In this case, it makes more sense to just let it be a 404.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53574>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list