[wp-trac] Re: [WordPress Trac] #3964: Aggressive matching in rewrite.php leads to "nothing matches" errors with custom rewrite endpoints

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 18 09:01:26 GMT 2007


#3964: Aggressive matching in rewrite.php leads to "nothing matches" errors with
custom rewrite endpoints
---------------------------------------------------+------------------------
 Reporter:  jhodgdon                               |        Owner:  westi   
     Type:  defect                                 |       Status:  assigned
 Priority:  normal                                 |    Milestone:  2.2     
Component:  General                                |      Version:  2.1.2   
 Severity:  normal                                 |   Resolution:          
 Keywords:  rewrite reporter-feedback 2nd-opinion  |  
---------------------------------------------------+------------------------
Changes (by westi):

  * keywords:  rewrite => rewrite reporter-feedback 2nd-opinion

Comment:

 Right I've had a look at this and EP_ROOT is definetly broken.

 However, I think there is a mismatch between what is available with the
 addition of extra endpoints and what you expect to happen.

 From reading the code I believe the following is true:

  1. The are a number of builtin endpoints = feeds, trackback, paging
  1. You can add you own endpoints at the same level.
  1. These endpoints are then added to the places you specify e.g. EP_ROOT
 - Therefore you would only get the following rules with EP_ROOT fixed:

 {{{
 feed/(feed|rdf|rss|rss2|atom)/?$
 (feed|rdf|rss|rss2|atom)/?$
 page/?([0-9]{1,})/?$
 new_endpoint(/(.*))?/?$
 }}}

 I am not sure that a new endpoint is what you want to use in order to be
 able to add language tags to every url.

 Do you not want a new rewrite tag? - e.g. %lang% which maps to ?lang= and
 is used in the permalink structure.  This would then get added for all
 permalink urls before the endpoints.

 Otherwise you need to be able to add endpoints to endpoints e.g. we would
 need EP_FEED, EP_PAGING and the ability to extend EP_ for new endpoints
 that wanted to support sub endpoints.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3964#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list