How to return HTTP 404 when no search results found?

It’s bad practice to do so purely because the Search Results page was found it just returned no results.

A 404 would be used if the search page didn’t exist.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)