Not really a support request, rather a "this is how we handled this." We have fast_404 enabled and noticed that if the user searched for a filename, it was intercepted by fast_404 and they got the fast_404 response. Not really the desired behavior we wanted. The fix is to change the fast_404_exts config to exclude the URL path we're running the search on (/gsearch/ in our case). Obscure regex, so I wanted to share:

(settings.php)
$conf['fast_404_exts'] = '/^((?!\/gsearch\/).)*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp|php|html?|xml)$/i';

That will match any URL that ends in one of those file extensions as long as it does _not_ start with /gsearch/. If you try for /gsearch/nosuchfile.txt, it will be passed through to the google_appliance module and not handled by fast_404.

Comments

iamEAP’s picture

Title: Usage with fast_404 » Using Google Appliance with Drupal fast_404
Issue summary: View changes
Status: Active » Fixed

Thanks for the tip @dnmurray! I'm renaming this issue so people find this more easily through Google, and also closing it, since it's not really actionable from a maintainer perspective.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.