[wp-trac] [WordPress Trac] #21841: redirect_canonical produces invalid redirects when post ID is specified

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 8 06:51:18 UTC 2012


#21841: redirect_canonical produces invalid redirects when post ID is specified
--------------------------+-----------------------------
 Reporter:  solarissmoke  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Canonical     |    Version:  3.4
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 With pretty permalinks disabled, visit the following url:

 `http://example.com/?p=1&feed=rss2`

 Assuming a post with that ID exists, this is valid and shouldn't be
 redirected anywhere. But it is redirected to:

 `http://localhost/wp/?feed=rss2&p=2`

 Note the encoded ampersand in the URL.

 Same happens with `http://example.com/?page_id=2&feed=rss2`. But it
 doesn't happen if you don't supply a post ID (e.g., with
 `http://example.com/?name=hello-world&feed=rss2` or
 `http://example.com/?year=2012&feed=rss2`).

 This was introduced in WP 3.4 from what I can tell (it doesn't happen in
 3.3).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21841>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list