I know nothing of tuckey, but I can think of two simple solutions:
1 Create a rule for search like that rewrites a url like /search?q=foo
to /search.jspf?q=foo
I am guessing something like:
<rule>
<name>Search</name>
<from>^/search\?(.*)$</from>
<to type="forward" last="true">/search.jsf?\1</to>
</rule>
Then simply change your default rule to use /search
instead of the actual file /search.jspf
:
<rule>
<name>Default + 404</name>
<from>^/[^\s]+$</from>
<to type="forward">^/search?q=$1</to>
</rule>
2 Rewrite your default rule's matching regex to specifically exclude search.jspf
using a negative lookahead:
<rule>
<name>Default + 404</name>
<from>^/(?!search.jspf)[^\s]+$</from>
<to type="forward">^/search.jspf?q=$1</to>
</rule>