I am using search404 module. It does show very nice search for the term "google OR drupal" if the page /google-drupal do not exist. Now I feels i need to show what is going on to the users and a Nice custom block wil be nice explaining what is going on but the problem is, how to show a block on such pages ?

I don't know the php code to be run for such block which gets displayed on pages shown by search404. Any help will be highly appreciated.

Cheers

Comments

internetter’s picture

Its a bit late, but I had the same problem and found a solution:

Use PHP-Code in the block setting:

  if (   preg_match('/^search\//', $_GET['q'])
      OR $_GET['q'] == 'search404'
  ) {
    return TRUE;
  }