ControlledChaos
7/17/2018 - 1:04 PM

Disable Redirect Guess

Stop WordPress attempts to guess the "correct" URL.

<?php

function ccd_no_redirect_on_404( $redirect_url ) {
    
    if ( is_404() ) {
        return false;
    }
    
    return $redirect_url;
    
}
add_filter( 'redirect_canonical', 'ccd_no_redirect_on_404' );

Disable Redirect Guess

WordPress Snippet