Make WordPress Core

Opened 20 months ago

Last modified 6 months ago

#57724 new defect (bug)

redirect_canonical() may not work if site_url contains port number

Reported by: obache's profile obache Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: Canonical Keywords: has-patch
Focuses: Cc:

Description

If site_url contains port number (for example, local test with http://localhost:8001/),
redirect_canonical() may not work as expected because port number is ignored when
constructing $redirect_url.

For example, "http://localhost:8001/category/name?paged=2" will not be redirect to
"http://localhost:8001/category/name/page/2".

Attachments (1)

patch.diff (535 bytes) - added by obache 20 months ago.

Download all attachments as: .zip

Change History (3)

@obache
20 months ago

#1 @sakibmd
20 months ago

Patch looks fine. Thanks @obache

Note: See TracTickets for help on using tickets.