%SCRIPTURL{"script"}%
https://intranet.npafi.org/bin/script
%SCRIPTURL{"viewauth"}%/%WEB%/%TOPIC%
which expands to https://intranet.npafi.org/bin/viewauth/TWiki/VarSCRIPTURL2
[[%SCRIPTURL{view}%/%WEB%/MyQuery?food=sushi][Sushi]]
%SCRIPTURLPATH{"script"}%
instead, as it works with URL rewriting much better