WordPress.org

Make WordPress Core

Opened 3 months ago

#53574 new defect (bug)

404 redirect guessing should not apply on URLs with trailing slashes

Reported by: markjaquith Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Canonical Keywords:
Focuses: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.