[wp-trac] [WordPress Trac] #29598: Use a 404 page not found instead of redirecting
WordPress Trac
noreply at wordpress.org
Tue Sep 9 14:05:59 UTC 2014
#29598: Use a 404 page not found instead of redirecting
--------------------------+------------------------
Reporter: henry.wright | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Canonical | Version: 4.0
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
--------------------------+------------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => duplicate
* component: General => Canonical
* milestone: Awaiting Review =>
Comment:
Duplicate of #16557. Try a workaround from there:
{{{
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: <https://core.trac.wordpress.org/ticket/29598#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list