When using the Search 404 module and Google CSE (Custom Search Engine) together, the result is an endless redirection that will… well, you know, loop endlessly and stop you from doing more important things, like getting to your search results.
The problem occurs in at least Search 404 version 6.x-1.7.
This can be easily fixed by changing one line into two in the /sites/all/modules/search404/search404.module file.
On line 117, in function search404_page(), change
drupal_goto ('search/google/'. $keys);
$_REQUEST['destination'] = 'search/google/'. $keys; drupal_goto();