Using EE 3.5.3:
The following two queries BOTH return an entry (and not one that matches):
{exp:channel:entries channel="pages" search:url_title="thisisfakeanddoesnotexist" limit="1" dynamic="no"}
{title}
{/exp:channel:entries}
{exp:channel:entries channel="pages" search:url_title="not thisisfakeanddoesnotexist" limit="1" dynamic="no"}
{title}
{/exp:channel:entries}
From my understanding search can only be used on USER fields - and ONLY certain types (https://docs.expressionengine.com/latest/channel/channel_entries.html#search-field-name), the results are correct.
You cannot search on ‘url_title’ it is a parameter NOT a field. You should use the parameter as described in the Docs for that type of query (https://docs.expressionengine.com/latest/channel/channel_entries.html#url-title).
Cheers!
Do you just mean to use the url_title=
parameter with require_entry='yes'
and an {if no_results}
redirect? User guide ref
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.