[wp-trac] [WordPress Trac] #27019: Redirect by page slug does not work in permalink structure /%category%/%postname%/

WordPress Trac noreply at wordpress.org
Mon Jun 30 23:43:44 UTC 2014

#27019: Redirect by page slug does not work in permalink structure
 Reporter:  dimagsv       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Permalinks    |     Version:  3.8.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:

Comment (by mboynes):

 First off, great research here. You nailed it with your trace: WordPress
 doesn't try to find pages by category name, only by post name.
 `/%category%/%postname%/` permalink structures fall into a special
 category called "verbose rewrite rules" where the pages aren't the
 fallback rules, which is why 'name' isn't set.

 > Wordpress has a feature to redirect by page slug

 Herein lay the problem: It doesn't. The feature is that it '''tries to
 guess the permalink of a would-be 404'''. That's a fallback, like a spare
 tire, which is nice to have in an unforeseen circumstance but not to be
 used daily.

 In my opinion, this isn't a bug. If you're changing your permalink
 structure, you should manage your redirects in a more reliable way and not
 rely upon `redirect_guess_404_permalink()`.

Ticket URL: <https://core.trac.wordpress.org/ticket/27019#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list