[wp-trac] [WordPress Trac] #16687: %postname% permalinks should not trigger verbose rewrite rules

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 20 08:25:33 UTC 2011


#16687: %postname% permalinks should not trigger verbose rewrite rules
-----------------------------+------------------
 Reporter:  nacin            |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  3.2
Component:  Rewrite Rules    |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------

Comment (by duck_):

 Replying to [comment:17 scribu]:
 > Wouldn't it be better to look for the 'attachment' part? That's how the
 regexes look.
 >
 > Also, you can use $wp_rewrite->feeds instead of the hardcoded array.

 Initial reaction is good point. However, I think it might mean just
 replacing it with 5 regular expressions since `^[^/]+/([^/]+)` could match
 a request like page-1/page-2/page-3 where page-2 is also an attachment
 slug (although attachments are supposed to be globally unique this might
 not be the case see #17170). But you're right, I think there is probably a
 cleaner way of getting it working if someone thinks about it a bit more
 and actually tries it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16687#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list