I had an idea for extending this module, but it's probably of minimal community value. I'd like to extend the "for your convenience" drupal message to include a constructed URL to a copy of an old static site. In other words, we just launched drupal-based example.com, and are getting lots of 404s for old pages (ie example.com/static.html). I'd like to present a link to the user that says--try our archived old site http://archive.example.com/static.html
Not really looking for anyone to do this and submit a patch--was thinking rolling my own custom module might be in order--I was just hoping for some advice.
Right now on my test site, I hacked in the following on line 215
drupal_set_message(t('The page you requested does not exist.<br />You can try the archive of our old site <a href="http://archive.example.com/'.$_REQUEST['destination'].'">here</a>.<br />For your convenience, a search was performed using the query %keys.', array('%keys' => check_plain($keys))), 'error');
And it seems to be working, but I was frightened by all the sql injection warnings in the code, and wanted to make sure I wasn't doing something stupid (I'm a total php newb).
Comments
Comment #1
zyxware commentedHi nrasmus
Your request is good, but then I believe the requirement is not within the scope of this module.
But if this becomes a popular demand will reconsider this and implement it as a part of the search404 feature.
Regards
Zyxware