Drupal 7 Search Redirect (similar to the old AOL keyword search) I've searched around for any pre-existing solutions to tackle this problem but so far nothing obvious. Here is basically what I'm after:

1) User enters keyword(s) via core search box

2) If user enters a specific keyword from a list of pre-determined keywords, redirect them immediately to a specific URL/node, e.g:

switch ($keyword) {
    case 'brand a':
        drupal_goto('brands/brand-a');
        break;
    case 'brand b':
        drupal_goto('brands/brand-b');
        break;
    default:
       do a regular keyword search . . .
       break;
endswitch;


3) If their keyword doesn't exist in the pre-determined list, shuffle them off to the standard Drupal search

Any ideas on how to best accomplish in Drupal 7?
If there is only a few you and you don't need any advanced matching you can add a path alias for the search path pointing to the preferred page.

E.g. searching for brand a gives you the path search/node/brand a. This path you can add as a path alias at admin/config/search/path/add pointing to a node of your choice.

For more advanced matching (and a more solid solution) you should probably hook into hook_search_preprocess() and do something along the lines of your example code.