[wp-trac] Re: [WordPress Trac] #8098: trailing p's removed from query by canonical redirect

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 8 10:17:51 GMT 2008


#8098: trailing p's removed from query by canonical redirect
---------------------+------------------------------------------------------
 Reporter:  DD32     |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  normal   |    Milestone:  2.7      
Component:  General  |      Version:  2.7      
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by azaozz):

 Yeah, it will 'eat' all ampersands around the removed part. Can probably
 put one back:
 {{{
 $redirect['query'] = preg_replace( '#(^|&)(p|page_id|cat|tag)=?(&|$)#'
 , '$3', redirect['query'] );
 }}}

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


More information about the wp-trac mailing list