Redirecting all non-existing pages to search?

Hi,



I need help disabling the 404 page that comes with CS-Cart and setting up a rewrite rule that takes the file path (my-cool-product.html where the full URL is [url]http://mysite.com/my-cool-product.html[/url]) and inserts it into the CS-Cart search engine and pulls up a results page.



I guess this just involves redirecting said string to a parameter of index.php. Does anyone have rewrite code to do this? Also, how do I disable the 404 page?



Thanks.