Redirect a 404 to search for the term but keep the 404 status code before the redirect

Redirect a 404 to search for the term but keep the 404 status code before the redirect

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