Wordpress itself is on the first letter appends the page title and opens it, how to fix it?

0 like 0 dislike
Good afternoon. This situation let's say there is a page "http://сайт.ру/sample-page/"and when I type "http://сайт.ру/sa" WordPress instead return the 404 error page opens at "http://сайт.ру/sample-page/"tell me if anyone knows how to fix it?
by | 4 views

2 Answers

0 like 0 dislike
This is an automatic redirection in WP.

You need to file functions.php add the following code to disable this feature:
remove_redirect_guess_404_permalink function( $redirect_url ) { if ( is_404() ) return false; return $redirect_url; } add_filter( 'redirect_canonical', 'remove_redirect_guess_404_permalink' );

More information can be read in English Ability to disable redirect_guess_404_permalink()
0 like 0 dislike
this is the autocompletion of the browser. delete cache, history.
110,608 questions
257,186 answers
33,685 users