[wp-trac] [WordPress Trac] #48223: parse_request(): When request has multiple matching rewrite rules, and matched rule returns 404 - iterate to next rewrite rule
WordPress Trac
noreply at wordpress.org
Wed Jul 2 14:13:05 UTC 2025
#48223: parse_request(): When request has multiple matching rewrite rules, and
matched rule returns 404 - iterate to next rewrite rule
------------------------------------+------------------------------
Reporter: apedog | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+------------------------------
Changes (by callumbw95):
* status: new => closed
* resolution: => wontfix
Comment:
Hi All,
I have just taken a look into this, and after reviewing the extensive
feedback, particularly the points raised by @dd32 and other core
committers, it's clear that the proposed change, while logical on the
surface, carries a significant risk of unintended consequences and
backward-compatibility breaks.
The current behavior, where WordPress commits to the first matched rewrite
rule, is fundamental to how themes and plugins have been built for years.
Introducing an iteration to the next rule if the first one results in a
404 would be a significant architectural shift. It could lead to
unpredictable behavior on existing sites, especially those with complex
custom rewrite setups or plugins that directly manipulate the query. The
performance implications of potentially running multiple queries for a
single request are also a valid concern.
Because of this and the fact this ticket has been sitting for 5 years
without any update, I am going to close this ticket as `wontfix`. However
please feel free to reopen the ticket if you wish to continue the
conversation around this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48223#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list