[wp-trac] [WordPress Trac] #16557: Ability to disable redirect_guess_404_permalink()
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 14 12:48:37 UTC 2011
#16557: Ability to disable redirect_guess_404_permalink()
-------------------------+-----------------------------
Reporter: msafi | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Canonical | Version: 3.0.5
Severity: minor | Resolution:
Keywords: needs-patch |
-------------------------+-----------------------------
Changes (by nacin):
* keywords: URL guessing, URL redirect => needs-patch
* milestone: Awaiting Review => Future Release
Comment:
+1. In fact I thought I already created this ticket. It should probably be
attached into redirect_canonical() through a filter.
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' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16557#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list