[wp-trac] [WordPress Trac] #16557: Ability to disable redirect_guess_404_permalink()

WordPress Trac noreply at wordpress.org
Tue May 20 14:42:31 UTC 2014


#16557: Ability to disable redirect_guess_404_permalink()
----------------------------------------------+----------------------------
 Reporter:  msafi                             |       Owner:
     Type:  enhancement                       |      Status:  new
 Priority:  normal                            |   Milestone:  Future
Component:  Canonical                         |  Release
 Severity:  minor                             |     Version:  3.1
 Keywords:  has-patch dev-feedback 4.0-early  |  Resolution:
                                              |     Focuses:
----------------------------------------------+----------------------------

Comment (by haukep):

 I stumbled upon this feature request while researching a solution for the
 issue outlined here: http://wordpress.stackexchange.com/questions/144937
 /disable-only-url-auto-complete-not-the-whole-canonical-url-system

 Replying to [comment:2 nacin]:
 > Whipped this up not long ago, as a workaround:
 > {{{
 > function remove_redirect_guess_404_permalink( $redirect_url ) {
 >     if ( is_404() )
 >         return false;
 >     return $redirect_url;
 > }
 > add_filter( 'redirect_canonical', 'remove_redirect_guess_404_permalink'
 );
 > }}}

 So for all people eagerly waiting for better control over how the redirect
 guess is performed, I took nacin's code above and turned it into a small
 plugin. The plugin still waits for its review but should hopefully be
 available here at some point: https://wordpress.org/plugins/disable-url-
 autocorrect-guessing/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/16557#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list