WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#50222 new defect (bug)

Autocorrect redirect to the wrong URL based on a word after permalink

Reported by: bloup Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.4.1
Component: Permalinks Keywords: close
Focuses: Cc:

Description

Sometimes, when the URL of a post ends with a keyword following the slash it redirects to a different page based on the keyword rather than the permalink.

For example:
Let's take this wordpress post URL:
[http://awishyourheartmakes.com/virtual-services/
]
If I had the word "super" at the end of the URL:
[http://awishyourheartmakes.com/virtual-services/super
]
rather than redirecting to http://awishyourheartmakes.com/virtual-services/

It will redirect to
http://awishyourheartmakes.com/super-fun-santa-maria/

Change History (1)

#1 @SergeyBiryukov
4 months ago

  • Keywords close added

Hi there, welcome to WordPress Trac! Thanks for the report.

This is expected behavior, WordPress is trying to guess the correct URL using the redirect_guess_404_permalink() function.

If you'd like to change this behavior, there's a plugin for that: Disable URL Autocorrect Guessing.

Note: See TracTickets for help on using tickets.