Ah, I had neglected to remember that DNN 5 is written in VB and DNN 6 and 7 are written in c#. So, you want to be looking at search.ascx.cs.
I don't have a handy copy of DNN6, but DNN7 does have a method ExecuteSearch in that file. You could edit that with an appropriate single-line replacement of what is there with this:
protected void ExecuteSearch(string searchText, string searchType) {
if (!string.IsNullOrEmpty(searchText)) {
Response.Redirect(("/tabid/<YOUR SEARCH PAGE ID>/default.aspx" + ("?q=" + Server.UrlEncode(searchText))));
return;
}
}
I'd still recommend going with a module, though.