It seems I have a similar problem to the one described in this thread.
You enter a search query and get redirected to the correct URL but the page displays the system message template saying Your search did not return any results instead of redirecting to the no-results template.
Removing the exp:search:search_results
tag causes the page to render correctly, but obviously without any search results in it. {exp:search:total_results}{total_results}{/exp:search:total_results}
also shows up as 0.
So why doesn't EE redirect to the no-results template if there are no results? Although it doesn't seem to matter what I enter, I get the error message each time.
Template code
Form
{exp:search:simple_form
channel="blog"
no_result_page="{segment_1}/search/no-results"
result_page="{segment_1}/search/results"
search_in="everywhere"
where="all"
}
<input type="text" name="keywords">
<input type="submit" value="Go">
{/exp:search:simple_form}
Results
<p>There were <strong>{exp:search:total_results}{total_results}{/exp:search:total_results}</strong> results for a search for <em>{exp:search:keywords}</em>.</p>
<ul class="search-results">
{exp:search:search_results}
<li>
<a href="{auto_path}/">{title}</a>
</li>
{/exp:search:search_results}
</ul>