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

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
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 | 21 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,187 answers
40,796 users