[wp-trac] [WordPress Trac] #12456: Canonical URL redirect issue with post_id/postname permalink structure
WordPress Trac
noreply at wordpress.org
Wed Jun 10 12:54:06 UTC 2020
#12456: Canonical URL redirect issue with post_id/postname permalink structure
----------------------------------------------+----------------------------
Reporter: Frank.Prendergast | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.5
Component: Canonical | Version: 2.9.2
Severity: normal | Resolution:
Keywords: early has-patch needs-unit-tests | Focuses:
----------------------------------------------+----------------------------
Comment (by needle):
Not quite sure how best to describe this, but [47937] breaks rewrite rules
that use a Page as the "top level" of a "virtual hierarchy", where the
path that follows the top level slug is interpreted as configuring the
Page.
So, for example, the URL `https://my.domain/mypage/one/two/` can be
rewritten via `add_rewrite_rule()` to render `https://my.domain/mypage/`
with the "path" `one/two/` determining the content that is rendered in the
Page with slug `mypage`.
Here's a real world example of this rewrite rule in CiviCRM:
https://github.com/civicrm/civicrm-
wordpress/blob/master/civicrm.php#L826-L831
What happens since [47937] is that
`https://my.domain/civicrm/event/info/?reset=1&id=1` incorrectly redirects
to `https://my.domain/civicrm/?reset=1&id=1` and therefore breaks the
rendering of the Page, since the "path" has been cleared.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12456#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list